I\'m interested in creating a macro for eliminating the unused variable warning.
This question describes a way to suppress the unused parameter warning by writing a
Just one small thing, better using __attribute__((__unused__))
as __attribute__((unused))
, because unused could be somewhere defined as macro, personally I had a few issues with this situation.
But the trick I'm using is, which I found more readable is:
#define UNUSED(x) (void)x;
It works however only for the variables, and arguments of the methods, but not for the function itself.