__attribute__((unused))

Specifies that the programmer is aware that a variable or function parameter is not referred to.

Syntax
  function-parameter __attribute__((unused));
  
  
  variable-declaration __attribute__((unused));
  
  
  variable-definition __attribute__((unused));
  
  
Remarks

This attribute specifies that the compiler should not issue a warning for an object if the object is not referred to. This attribute specification has no effect if the compiler's unused warning setting is off.

Listing: Example of the unused attribute

void f(int a __attribute__((unused))) /* No warning for a. */

{

  int b __attribute__((unused)); /* No warning for b. */

  int c; /* Possible warning for c. */

  return 20;

}