在 CC/GCC 构建期间 'make' 是否没有输出 "redirecting incorrect #include" 警告?
Have 'make' not output "redirecting incorrect #include" warnings during CC/GCC build?
有没有flag可以让'make'到not输出"redirecting incorrect #include" 消息在 CC/GCC 建筑期间?
我知道 --disable-warnings-as-errors 可以,但是有更具体的吗?
想要静音的示例输出:
In file included from ./src/or/or.h:31:0,
from src/test/test_routerlist.c:12:
/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
#warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
我无法复制(我的 sys/fcntl.h
副本是 #include <fcntl.h>
),但请尝试将 -Wno-cpp
添加到您的 cflags。来自 man gcc
:
-Wno-cpp
(C, Objective-C, C++, Objective-C++ and Fortran only)
Suppress warning messages emitted by "#warning" directives.
通常,触发警告的选项会与警告一起打印(-Wcpp
适合您)。您可以使用 -Wno-<warning>
标志禁用特定警告。
有没有flag可以让'make'到not输出"redirecting incorrect #include" 消息在 CC/GCC 建筑期间?
我知道 --disable-warnings-as-errors 可以,但是有更具体的吗?
想要静音的示例输出:
In file included from ./src/or/or.h:31:0,
from src/test/test_routerlist.c:12:
/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
#warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
我无法复制(我的 sys/fcntl.h
副本是 #include <fcntl.h>
),但请尝试将 -Wno-cpp
添加到您的 cflags。来自 man gcc
:
-Wno-cpp
(C, Objective-C, C++, Objective-C++ and Fortran only)
Suppress warning messages emitted by "#warning" directives.
通常,触发警告的选项会与警告一起打印(-Wcpp
适合您)。您可以使用 -Wno-<warning>
标志禁用特定警告。