B2_NOT_USED and gcc

gcc gives a warning "Statement has no effect" every time it finds B2_NOT_USED. It is no harm if warnings goes while compiling a library, because you compile it only once, but this warning also goes while compiling any c++ file including box2d.h
So I changed b2Settings.h:
Code:
#ifdef MSVC
#define B2_NOT_USED(x) x
#else
#define B2_NOT_USED(x)
#endif
But that will produce many "not used" warnings instead. Also in GCC, with the right options.

Other options are:

#define B2_NOT_USED(x) (void)(x)
Still uses the var, but does not generate the no effect statement in GCC. I've seen this one before. Not sure if it works right in MSVC.

#define B2_NOT_USED(x) if (x) {}
I have seen this, but I don't think it works as intended.
What do you mean under "right options"? I use -Wall and do not use -pedantic (and box2d does not compile with this option as I can see). My gcc version is 3.4.5 (mingw special). And I do not see any "not used" warnings.

Original thread: https://box2d.org/forum/viewtopic.php?t=1460