Blame gnulib/lib/unused-parameter.h

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