-Woption 让编译器给出option指定的编译警告,常用的一些如下: unused-function: 遇到仅声明过但尚未定义的静态函数时发出警告 unused-parameter: 从未用过的函数参数的警告。 unused-variable: 在本地声明但从未用过的变量的警告。 unused-value: 经计算但从未用过的值得警告。 return-type: 对函数返回类型不当的警...
idf_component_register(SRCS "wifi_manager.cpp" INCLUDE_DIRS "include" PRIV_REQUIRES "lwip" "esp_wifi" "log") # Define strict warning flags for your own source files set(MY_FLAGS "-Wall" "-Wextra" "-Wpedantic" "-Werror" "-Werror=unused-function" "-Werror=unused-variable...
I am attempting to package openfortivpn for Debian. I get these error messages at compile-time: src/io.c:49:22: error: 'thread_id' defined but not used [-Werror=unused-function] static unsigned long thread_id() ^~~~ src/io.c:42:13: ...
[ 133s] execpipe.cc: In function 'crucible::Fd crucible::popen(std::function<int()>, std::function<void(const crucible::ResourceHandle<int, crucible::IOHandle>&)>)': [ 133s] execpipe.cc:81:38: error: ignoring return value of 'int system(const char*)', declared with attribute warn...
解决办法:defined but not used [-Werror=unused-variable] 遇到错误如下:/grpc/gens/src/proto/grpc/core/stats.pb.cc:187:13: error: ‘dynamic_init_dummy_src_2fproto_2fgrpc_2fcore_2fstats_2eproto’ defined but not used [-Werror=unused-variable] static bool dynamic_... ...
src/switch_core_cert.c: In function ‘switch_ssl_init_ssl_locks’: /home/quantum6/build_libs/include/openssl/crypto.h:235:57: error: statement with no effect [-Werror=unused-value] # define CRYPTO_THREADID_set_callback(threadid_func) (0) ...
flags 再运行项目就可以了...运行ReactNative的项目会报错ignoring return value of function declared with warn_unused_result attribute -Wall两个flags 再运行项目就可以了...升级到Xcode8后,运行ReactNative的项目会报错ignoring return value of function declared with warn_unused ...
-Wimplicit-function-declaration (C and Objective-C only) -Winit-self (only for C++) -Wlogical-not-parentheses -Wmain (only for C/ObjC and unless -ffreestanding) -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation (only for C/C++) ...
LOCAL_CFLAGS+=-Wno-unused-const-variable \-Wno-null-conversion \-Wno-unused-variable \-Wno-unused-parameter \-Wno-unknown-pragmas \-Wno-unused-value\-Wno-macro-redefined \-Wno-sign-compare \-Wno-incompatible-pointer-types \-Wno-pointer-sign \-Wno-parentheses \-Wno-unused-function \-Wno-fo...
解决办法,增加 -Wno-error=unused-value: ./configure \ --prefix=${BUILD_LIBS} \ --disable-core-libedit-support \ CFLAGS="-I${BUILD_LIBS}/include -Wno-error=unused-value" \ LDFLAGS=-L${BUILD_LIBS}/lib # 这个参数无效。 # --disable-werror柳鲲鹏...