编译出错 --- -Werror=format=

./include/linux/kern_levels.h:5:18: error: format '%llx' expects argument of type 'long long unsigned int', 
but argument 3 has type 'phys_addr_t' {aka 'unsigned int'} [-Werror=format=]

可以通过修改编译选项,加上 -Wno-format 即可,如:

KBUILD_CFLAGS   := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
           -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
           -Werror=implicit-function-declaration -Werror=implicit-int \
           -Werror=return-type -Wno-format \
           -std=gnu89

 

posted @   流水灯  阅读(260)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
点击右上角即可分享
微信分享提示