Assuming this
int f(int x, int y)
{
return y;
}
to provoke the warning mentiond by the OP.
For gcc just do this
int f(int x __attribute__ ((unused)), int y)
{
return y;
}
to have the waninng disappear.
A more generic trick is to just do:
int f(int x, int y)
{
x = x;
return y;
}
For gcc specifing the option -Wno-unused-parameter
should disable this warning.