解释什么是“statement with no effect [-Wunused-value]”警告 "statement with no effect [-Wunused-value]" 是一个由C和C++编译器(如GCC)发出的警告,它指出代码中存在一个没有实际效果的语句。这通常发生在以下几种情况: 表达式的结果被计算了,但计算结果没有被使用。 使用了赋值运算符(如=)的地方错误地使...
warning: statement with no effect [-Wunused-value] 412 | for(i;i < gscreensaverIconNum; i++){ 这个警告是由编译器产生的,提示你的代码中存在没有实际效果的语句。在你提供的代码中,for循环中的i没有初始化,可能导致未定义行为。你可以尝试将i初始化为合适的值,例如将其设置为 0: for(inti=0;i<g...
warming:statement with no effect 错误原因: for语句格式错误 for语句的格式 for(初始化语句;判断条件语句;控制条件语句) { 循环体语句; }
/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) ^ src/switch_core_cert.c:72:3: note: in expansion of macro ‘CRYPTO_THREADID_set_callback’ CRYPTO_THREADID_set...
编译grub时报告"grub_script.yy.c:19:22: error: statement with no effect [-Werror=unused-value]"怎么处理? 答: 在configure时加--disable-werror选项,如下: ./configure --target=aarch64-linux-gnu--disable-werror
简介: error: statement with no effect [-Werror=unused-value] 完整错误如下: make[1]: 进入目录“/home/quantum6/freeswitch/freeswitch-1.10.3” CC src/libfreeswitch_la-switch_core_cert.lo In file included from ./src/include/switch_ssl.h:39:0, from src/switch_core_cert.c:33: src/...
编译grub时报告"grub_script.yy.c:19:22: error: statement with no effect [-Werror=unused-value]"怎么处理?,答:在configure时加--disable-werror选项,如下:./configure --target=aarch64-linux-gnu --disable-werror
I keep on getting "statement seem to have no effect" on places that obviously do have an effect (yellow backgroud fields) Of course I can turn the warning off, but I would like to be reminded if I have a statement with no effect. I'm using Build #PY-2...
In this example neither line of the increment_and_show() function has any effect. The first line, ++x, has no effect as it applies the unary plus operator twice. Probably the programmer intended x += 1 The second line, x.show, has no observable effect, but it is likely that x.show...
“The use statement with non-compound name … has no effect” 我们就能明确这个错误信息指的是use语句中出现的名称不是复合名称。不符合规则,所以“没实用”。 检查你的语句是不是直接在use后面跟上了类或接口的名字,比方 use News; 改动为: use YourNameSpace\News; (这个和use YourNameSpace\News as Ne...