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