void foo(int temp,int errer); // ERROR: errer is misspelled
{
error = do_something(); // WARNING: temp and error are unused.
} void foo(int temp, int error)
{
#pragma unused (temp)
/* Compiler won't warn that temp is not used */
error=do_something();
}You can also turn off the ANSI Strict option, and not give the unused argument a name. (See "Unnamed Arguments in Function Definitions.") For example:
void foo(int /* temp */, int error)
{
/* Compiler won't warn that temp is not used, it's not named
error=do_something(); */
}
The Unused Arguments option corresponds to the pragma warn_unusedarg, described at "warn_unusedarg." To check whether this option is on, use __option (warn_unusedarg). See "Checking Options" for information on how to use this directive.