unused-parameter.h 789 B

1234567891011121314151617181920
  1. /* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
  2. declarations for parameters that are not used. This helps to reduce
  3. warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
  4. type param _GL_UNUSED_PARAMETER
  5. or more generally
  6. param_decl _GL_UNUSED_PARAMETER
  7. For example:
  8. int param _GL_UNUSED_PARAMETER
  9. int *(*param)(void) _GL_UNUSED_PARAMETER
  10. Other possible, but obscure and discouraged syntaxes:
  11. int _GL_UNUSED_PARAMETER *(*param)(void)
  12. _GL_UNUSED_PARAMETER int *(*param)(void)
  13. */
  14. #ifndef _GL_UNUSED_PARAMETER
  15. # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
  16. # define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
  17. # else
  18. # define _GL_UNUSED_PARAMETER
  19. # endif
  20. #endif