exp2l: Work around a NetBSD 10.0/i386 bug.
[gnulib.git] / lib / unused-parameter.h
blob83faefafd6c5e929d49719be8f11a876ee9f9d2e
1 /* A C macro for declaring that specific function parameters are not used.
2 Copyright (C) 2008-2024 Free Software Foundation, Inc.
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.
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.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* _GL_UNUSED_PARAMETER is a marker that can be prepended 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 _GL_UNUSED_PARAMETER type param
21 or more generally
22 _GL_UNUSED_PARAMETER param_decl
23 For example:
24 _GL_UNUSED_PARAMETER int param
25 _GL_UNUSED_PARAMETER int *(*param) (void)
27 #ifndef _GL_UNUSED_PARAMETER
28 # define _GL_UNUSED_PARAMETER _GL_ATTRIBUTE_MAYBE_UNUSED
29 #endif