defined but not used [-werror=unused-function] 警告解析 1. [-werror=unused-function] 警告的含义 [-werror=unused-function] 是一个编译器警告(在GCC等编译器中常见),它指示编译器在遇到未使用的函数定义时发出警告,并将此警告视为错误(由于 -Werror 的作用)。这意味着,如果代码中定义了某个函数,但在...
-Woption 让编译器给出option指定的编译警告,常用的一些如下: unused-function: 遇到仅声明过但尚未定义的静态函数时发出警告 unused-parameter: 从未用过的函数参数的警告。 unused-variable: 在本地声明但从未用过的变量的警告。 unused-value: 经计算但从未用过的值得警告。 return-type: 对函数返回类型不当的警...
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: error: 'lock_callback' defined but not used ...
-Wimplicit-function-declaration (C and Objective-C only) 在声明之前使用函数时发出警告。 在C99模式下( -std = c99或-std = gnu99 ),默认情况下会启用此警告,并通过-pedantic-errors将其设置为错误 。 此警告也由-Wall启用。 -Wimplicit (C and Objective-C only) 与-Wimplicit-int和-Wimplicit-functi...
unused-parameter -Wno-missing-field-initializers -Wpointer-arith -Wstrict-prototypes -Wcast-qual -Wcast-align -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-error=stringop-truncation -Wno-unknown-warning-option -Werror -MT libneo4j_client_la-error_...
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) ...
error: statement with no effect [-Werror=unused-value] 完整错误如下:make[1]: 进入目录“/home/quantum6/freeswitch/freeswitch-1.10.3” CC src/libfreeswitch_la-switch_core_cert.loIn file included from ./src/include/switch_ssl.h:39:0, ...
set but not used [-Werror=unused-but-set-variable]linux.c:334:22: error: variable 'unused' set but not used [-Werror=unused-but-set-variable]linux.c: In function'linux_set 浏览0提问于2014-12-23得票数0 1回答 使用CUDA编译OpenCV示例程序时出错 ...
解决办法,增加 -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...
@@ -392,7 +392,9 @@ function(torch_compile_options libname) -Werror=inconsistent-missing-override -Werror=inconsistent-missing-destructor-override -Werror=unused-function -Werror=unused-variable) -Werror=unused-variable -Werror=pedantic ) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") list(APPEND...