How can I disable the following warning in C++ in minGW?
warning: unused variable 'x' [-Wunused-variable]
In Eclipse CDT, I can't locate the warning number:
../src/subfolder/ClassTwo.cpp:20:8: warning: unused variable 'x' [-Wunused-variable]
I tried doing this:
#pragma warning(push)
#pragma warning(disable: ?) //which number?
#include "subfolder/ClassTwo.h"
#pragma warning(pop)
But it didn't work.
My questions:
- How can I get the warning number of this in Eclipse CDT?
- How should the pragma directive be written?