
27 Jun
2006
27 Jun
'06
12:38 p.m.
Reece Dunn wrote:
Paul Bristow wrote:
NOTE: Instead of disabling the warnings, you can remove the warning by updating the code. For example:
This is a better approach... warnings are there for a good reason, after all.
void foo( int bar ){} // unreferenced parameter void foo( int bar ){ bar; } // no warning!
Why is the parameter there in the first place? Either remove it if it is never used: void foo(void) { } or comment its name out but leave the type: void foo(int /* bar */) { } Either will avoid the compiler warning.