This question already has an answer here:
Using gcc 4.8.4 -Wall -Wextra -Wpedantic. I want to use argv for the executable name and have no need for argc.
If I do
int main(int argc, char *argv[])
I get this warning:
abc.c:5:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
In the past I have just done
int main(int, char *argv[])
to get rid of the warning, but that may have been C++. Now I get an error:
abc.c:5:1: error: parameter name omitted
Is there a way to access argv and not get a warning for not accessing argc (with gcc warnings turned on)?