Using the -Wunused-parameter flag, you can enforce __unused for unused parameters, as a compiler optimization. The following code causes two warnings:
#include &
Another way to skin this cat is to remove (or comment out) the name of the parameter.
int main ( int argc, char ** /* argv */ ) { printf("hello world. there are %d args\n", argc); return 0; }
Now the compiler won't warn about argv being unused, and you can't use it, because it has no name.
argv