f30ef4780a9b9ad5aac55d062c658f012bf930d4
[debian/tar] / build-aux / snippet / unused-parameter.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A C macro for declaring that specific function parameters are not used.
4    Copyright (C) 2008-2013 Free Software Foundation, Inc.
5
6    This program is free software: you can redistribute it and/or modify it
7    under the terms of the GNU General Public License as published
8    by the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18
19 /* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
20    declarations for parameters that are not used.  This helps to reduce
21    warnings, such as from GCC -Wunused-parameter.  The syntax is as follows:
22        type param _GL_UNUSED_PARAMETER
23    or more generally
24        param_decl _GL_UNUSED_PARAMETER
25    For example:
26        int param _GL_UNUSED_PARAMETER
27        int *(*param)(void) _GL_UNUSED_PARAMETER
28    Other possible, but obscure and discouraged syntaxes:
29        int _GL_UNUSED_PARAMETER *(*param)(void)
30        _GL_UNUSED_PARAMETER int *(*param)(void)
31  */
32 #ifndef _GL_UNUSED_PARAMETER
33 # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
34 #  define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
35 # else
36 #  define _GL_UNUSED_PARAMETER
37 # endif
38 #endif