Blame lib/unused-parameter.h

Packit 8f70b4
/* A C macro for declaring that specific function parameters are not used.
Packit 8f70b4
   Copyright (C) 2008-2018 Free Software Foundation, Inc.
Packit 8f70b4
Packit 8f70b4
   This program is free software: you can redistribute it and/or modify it
Packit 8f70b4
   under the terms of the GNU General Public License as published
Packit 8f70b4
   by the Free Software Foundation; either version 3 of the License, or
Packit 8f70b4
   (at your option) any later version.
Packit 8f70b4
Packit 8f70b4
   This program is distributed in the hope that it will be useful,
Packit 8f70b4
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 8f70b4
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 8f70b4
   General Public License for more details.
Packit 8f70b4
Packit 8f70b4
   You should have received a copy of the GNU General Public License
Packit 8f70b4
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
Packit 8f70b4
Packit 8f70b4
/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
Packit 8f70b4
   declarations for parameters that are not used.  This helps to reduce
Packit 8f70b4
   warnings, such as from GCC -Wunused-parameter.  The syntax is as follows:
Packit 8f70b4
       type param _GL_UNUSED_PARAMETER
Packit 8f70b4
   or more generally
Packit 8f70b4
       param_decl _GL_UNUSED_PARAMETER
Packit 8f70b4
   For example:
Packit 8f70b4
       int param _GL_UNUSED_PARAMETER
Packit 8f70b4
       int *(*param)(void) _GL_UNUSED_PARAMETER
Packit 8f70b4
   Other possible, but obscure and discouraged syntaxes:
Packit 8f70b4
       int _GL_UNUSED_PARAMETER *(*param)(void)
Packit 8f70b4
       _GL_UNUSED_PARAMETER int *(*param)(void)
Packit 8f70b4
 */
Packit 8f70b4
#ifndef _GL_UNUSED_PARAMETER
Packit 8f70b4
# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
Packit 8f70b4
#  define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
Packit 8f70b4
# else
Packit 8f70b4
#  define _GL_UNUSED_PARAMETER
Packit 8f70b4
# endif
Packit 8f70b4
#endif