On Tue, Nov 05, 2013 at 07:23:30PM +0100, Krol, Willem van de wrote:
> Indeed, casting to void doesn't have any effect. The variable doesn't
> become unusable or something like that (no compiler warning or error).

Casting to void has an effect. In case an argument to a function is not 
used anywhere in that function the compiler would give a warning, 
because that could be unintended.
Having a macro for (void) is nice, because, as already said, it's 
shorter to type, and additionally so you have one place that you can 
change to make all those warnings visible for a whole project. I.e. you 
substitute that macro with an empty string.

Kind regards,
-Alex

Reply via email to