Mercurial > hg > octave-nkf > gnulib-hg
annotate build-aux/unused-parameter.h @ 13415:a884db63982b
Avoid some more warnings from "gcc -Wwrite-strings".
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 11 Jun 2010 21:17:11 +0200 |
parents | c2cbabec01dd |
children | 97fc9a21a8fb |
rev | line source |
---|---|
12500 | 1 /* A C macro for declaring that specific function parameters are not used. |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12500
diff
changeset
|
2 Copyright (C) 2008-2010 Free Software Foundation, Inc. |
12500 | 3 |
4 This program is free software: you can redistribute it and/or modify it | |
5 under the terms of the GNU Lesser General Public License as published | |
6 by the Free Software Foundation; either version 2 of the License, or | |
7 (at your option) any later version. | |
8 | |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 Lesser General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU Lesser General Public License | |
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
16 | |
17 /* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter | |
18 declarations for parameters that are not used. This helps to reduce | |
19 warnings, such as from GCC -Wunused-parameter. The syntax is as follows: | |
20 type param _GL_UNUSED_PARAMETER | |
21 or more generally | |
22 param_decl _GL_UNUSED_PARAMETER | |
23 For example: | |
24 int param _GL_UNUSED_PARAMETER | |
25 int *(*param)(void) _GL_UNUSED_PARAMETER | |
26 Other possible, but obscure and discouraged syntaxes: | |
27 int _GL_UNUSED_PARAMETER *(*param)(void) | |
28 _GL_UNUSED_PARAMETER int *(*param)(void) | |
29 */ | |
30 #ifndef _GL_UNUSED_PARAMETER | |
31 # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) | |
32 # define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) | |
33 # else | |
34 # define _GL_UNUSED_PARAMETER | |
35 # endif | |
36 #endif |