|
From: Piotr J. <p.j...@gm...> - 2011-03-28 14:13:12
|
Hello, the valgrind.h header imported from the project causes set but not used warnings with gcc 4.6.0 when NVALGRIND is defined. The culprit are VALGRIND_MALLOCLIKE_BLOCK, VALGRIND_FREELIKE_BLOCK and similar macros: error: variable ‘_qzz_res’ set but not used [-Werror=unused-but-set-variable] I think the proper solution is to add __attribute__((unused)) to _qzz_res. What do you think? For reference gcc docs on unused: unused - This attribute, attached to a variable, means that the variable is meant to be possibly unused. GCC will not produce a warning for this variable. -- Best Regards Piotr Jaroszyński |