可以在 Makefile 中添加以下语句来关闭此警告:

ccflags-y += -Wno-error=declaration-after-statement

其中,'ccflags-y' 是内核 Makefile 中用于指定编译选项的变量。通过添加 '-Wno-error=declaration-after-statement',可以将此警告从错误级别降为警告级别,从而避免编译错误。

如何在 Makefile 中关闭 -Werror=declaration-after-statement 警告

原文地址: https://www.cveoy.top/t/topic/lZrT 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录