GLOBAL_CXXFLAGS+= -g -Wall -Wdeprecated-copy -Wignored-qualifiers -Wimplicit-fallthrough -Werror=unused-result -include$(buildprefix)config.h -std=c++2a -I src #Include the main lib, causing rules to be defined Expand Down 1 change: 1 addition & 0 deletions1src/libfetchers/meson.build...
[ 133s] execpipe.cc:81:38: error: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Werror=unused-result] [ 133s] system("ls -l /proc/$$/task/ >&2"); [ 133s] ^ [ 133s] cc1plus: all warnings being treated as errors ...
flags 再运行项目就可以了...运行ReactNative的项目会报错ignoring return value of function declared with warn_unused_result attribute ReactNative : ignoring return value of function declared with warn_unused_result attribute -Wall两个flags 再运行项目就可以了...升级到Xcode8后,运行ReactNative的项目会报错...
rwpng.c:85:5: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 85 | fread(sig, 1, 8, infile); | ^~~~ In file included from pngnq.c:99: neuquant32.h:59:22: warning: ‘biasvalue’ declared ‘static’ but never defined [...
comapi.c:425:15: 错误:变量‘status’被设定但未被使用 [-Werror=unused-but-set-variable] isc_result_t status; ^ comapi.c: 在函数‘dhcp_control_signal_handler’中: comapi.c:514:25: 错误:变量‘control’被设定但未被使用 [-Werror=unused-but-set-variable] ...
-Wno-shift-count-overflow -Wswitch-unreachable -Wunused-but-set-parameter -Wunused -Wunused-but-set-variable -Wunused-function -Wunused-parameter -Wno-unused-result -Wunused-variable -Wunused-const-variable=2 -Wunused-value -Wunknown-pragmas -Wno-aggressive-loop-optimizations -Wno-stringop-overread ...
解决: -Wno- 加上对应的变量或参数类型,即可忽略当前警告,编译通过。 例: [-Wunused-parameter] 变成 -Wno-unused-parameter 例: [-Werror,-Wsign-compare] 变成 -Wno-sign-compare LOCAL_CFLAGS+=-Wno-unused-const-variable \-Wno-null-conversion \-Wno-unused-variable \-Wno-unused-parameter \-Wno-un...
New warnings for unused variables and parameters The behavior of -Wall has changed and now includes the new warning flags -Wunused-but-set-variable and (with -Wall -Wextra) -Wunused-but-set-parameter. This may result in...
>> attribute warn_unused_result [-Wunused-result] >> cc1: some warnings being treated as errors >> make[4]: *** [linc.lo] Error 1 > > The full build log is available from: > >http://people.debian.org/~lucas/logs/2013/05/09/orbit2_2.14.19-0.1_unstable.log> ...
至于-Wall,您可以使用target_compile_options以类似的方式为每个目标设置-Wall,但这会对CMakeLists.txt...