GCC compiler flags that control unused warnings include:
-Wunused-function
-Wunused-label
-Wunused-parameter
-Wunused-value
-Wunused-variable
-Wunused (=all of the above)
Disable for a single file or section of code
//Deal with "error: label defined but not used [-Werror=unused-label]" from compiler
//#pragma GCC diagnostic push
//#pragma GCC diagnostic ignored "-Wunused-label"
//My code...
//#pragma GCC diagnostic pop
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.