跳至主要內容

variable “X” set but not used 報錯解法

build UBoot時 gcc報錯說 variable ‘data’ set but not used [-Werror=unused-but-set-variable] 相關資訊,即便在if function 裡面使用變數依然會報錯。

把Makefile 裡面的build 的參數 -Werror 拿掉,就可以降低warning level

-Werror 把所有警告當成error編譯

-Wall 增加警告選項

-Wextra 警告資訊詳細

-w disable all warning

分類:Uncategorized

搶先發佈留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

由 Compete Themes 設計的 Author 佈景主題