add way to declare parameter as unused (#72)

Riot lags some way to declare, that a function parameter is unused. This commit adds a file called “unused.h”, which defines some nice macros.

http://stackoverflow.com/questions/3599160/unused-parameter-warnings-in-c-code

this commit fixes #62 (the discussion wasn’t finally over in this issue)

Sorry, but I don’t quite see the advantage in using UNUSED(variable) compared to the standards compliant (void) variable.

Let me elaborate further why I’d prefer (void) var: Using type UNUSED(var) in the parameters does tell anything why it is unused, it simply hides a warning. You could accomplish that by using the -w parameter …

But (void) var can be used in the appropriate #IF branch, and/or you can assign a proper comment to it:

 (void) var; /* var is unused because of reason */

Also, (void) var; works without any macro magic. I *hate* everything written in all-capitals within function blocks and try to avoid it like the pest.

ok, I see. You two prefer an other way :slight_smile:

@Kijewski make a pull request and I’ am totally with you in merging your code!

after having fixed this class of problems, there’s just one single warning in riot (-Wall and -Wextra enabled, gcc and clang), so we are on a good way to have a warning free system!

Guys, this is AWESOME. If it's true for all supported platforms, let's add -Werror to CFLAGS, make a nice headline and boast about it in our features list!

+1 for committing (void) stuff.

current “master”+“unused fixes”: native and msba2 are warning-free. msb-430h has some warnings.

I agree with @Kijewski the mysterious @RIOT-notifier ;-). So, I guess we can close this one.

Closed #72.