Boost logo

Boost :

From: Paul Giaccone (paulg_at_[hidden])
Date: 2006-06-27 08:38:13


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk