、、 我有一堆编译时断言,例如:当我和GCC一起编译的时候,我收到了很多像'prefix_LineNumber' definedbut not used这样的警告。有没有办法隐藏编译时断言的警告?我没有幸运地搜索到GCC的文档。我想我可以在同一个宏中自动全局使用var,但我想不出任何方法来做到这 浏览1提问于2008-12-22得票数 71...
static void func7(); //to prove label defined but never used static void func4(int a); //to prove parameter declared but not used static void func5(); //to prove local variable defined but not used static void func6(); //to prove value evaluated but not used static int var1; ...
13) 下列编译告警是因为一个static类型的函数未被使用 my.cpp:364: warning: 'int my_function(const cgicc::Cgicc&, const std::string&)' defined but not used 只需使用“__attribute__((unused))”修饰函数的声明即可: static int __attribute__((unused)) my_function(const cgicc::Cgicc&, cons...
static void func3(); //to prove label used but never defined static void func7(); //to prove label defined but never used static void func4(int a); //to prove parameter declared but not used static void func5(); //to prove local variable defined but not used static void func6()...
void func7(); //to prove label defined but never used static void func4(int a); //to prove parameter declared but not used static void func5(); //to prove local variable defined but not used static void func6(); //to prove ...
my.cpp:364: warning: 'int my_function(const cgicc::Cgicc&, const std::string&)' defined but not used 只需使用“__attribute__((unused))”修饰函数的声明即可: static int __attribute__((unused)) my_function(const cgicc::Cgicc&, const std::string&); ...
test_unused.c:6: warning: `func1' used but never defined test_unused.c:25: warning: `func2' defined but not used test_unused.c:14: warning: `var1' defined but not used [-Wuninitialized] 该警告选项用于检查一个局部自动变量在使用之前是否已经初始化了或者在一个longjmp调用可能修改一个non-...
How can I hide “defined but not used” warnings in GCC?,http://stackoverflow.com/questions/386220/how-can-i-hide-defined-but-not-used-warnings-in-gccJustsawthis...
When compiling with GCC I get many warnings like'prefix_LineNumber' defined but not used. Is there a way I can hide warnings for compile time asserts? I had no luck searching the GCC documentation. I thought I might have the var automatically used globally inside the same macro but I cou...
staticvoidfunc4(inta);//topovepaametedeclaedbutnotused staticvoidfunc5();//topovelocalvaiabledefinedbutnotused staticvoidfunc6();//topovevalueevaluatedbutnotused staticintva1; voidtest(){ func1(); func3(); func4(4); func5();