From: Bruno Haible Date: Tue, 12 Jul 2011 09:43:19 +0000 (+0200) Subject: Rename module 'unused-parameter' to 'snippet/unused-parameter'. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=620ece7758e453efebf7f52a1ab9fc1c49a5020c;p=pspp Rename module 'unused-parameter' to 'snippet/unused-parameter'. * modules/snippet/unused-parameter: Renamed from modules/unused-parameter. (Files, Makefile.am): Update. * build-aux/snippet/unused-parameter.h: Renamed from build-aux/unused-parameter.h. * modules/selinux-h (Depends-on): Update. * modules/unistr/base (Depends-on): Update. * MODULES.html.sh (Core language properties): Update. --- diff --git a/ChangeLog b/ChangeLog index 0764d27998..533f1a4886 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-07-12 Bruno Haible + + Rename module 'unused-parameter' to 'snippet/unused-parameter'. + * modules/snippet/unused-parameter: Renamed from + modules/unused-parameter. + (Files, Makefile.am): Update. + * build-aux/snippet/unused-parameter.h: Renamed from + build-aux/unused-parameter.h. + * modules/selinux-h (Depends-on): Update. + * modules/unistr/base (Depends-on): Update. + * MODULES.html.sh (Core language properties): Update. + 2011-07-12 Bruno Haible Rename module 'link-warning' to 'snippet/link-warning'. diff --git a/MODULES.html.sh b/MODULES.html.sh index db4643e008..575a5a7486 100755 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -2012,7 +2012,7 @@ func_all_modules () func_module func func_module inline func_module longlong - func_module unused-parameter + func_module snippet/unused-parameter func_module va-args func_module vararrays func_end_table diff --git a/build-aux/snippet/unused-parameter.h b/build-aux/snippet/unused-parameter.h new file mode 100644 index 0000000000..5a1be7109c --- /dev/null +++ b/build-aux/snippet/unused-parameter.h @@ -0,0 +1,36 @@ +/* A C macro for declaring that specific function parameters are not used. + Copyright (C) 2008-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter + declarations for parameters that are not used. This helps to reduce + warnings, such as from GCC -Wunused-parameter. The syntax is as follows: + type param _GL_UNUSED_PARAMETER + or more generally + param_decl _GL_UNUSED_PARAMETER + For example: + int param _GL_UNUSED_PARAMETER + int *(*param)(void) _GL_UNUSED_PARAMETER + Other possible, but obscure and discouraged syntaxes: + int _GL_UNUSED_PARAMETER *(*param)(void) + _GL_UNUSED_PARAMETER int *(*param)(void) + */ +#ifndef _GL_UNUSED_PARAMETER +# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) +# else +# define _GL_UNUSED_PARAMETER +# endif +#endif diff --git a/build-aux/unused-parameter.h b/build-aux/unused-parameter.h deleted file mode 100644 index 5a1be7109c..0000000000 --- a/build-aux/unused-parameter.h +++ /dev/null @@ -1,36 +0,0 @@ -/* A C macro for declaring that specific function parameters are not used. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter - declarations for parameters that are not used. This helps to reduce - warnings, such as from GCC -Wunused-parameter. The syntax is as follows: - type param _GL_UNUSED_PARAMETER - or more generally - param_decl _GL_UNUSED_PARAMETER - For example: - int param _GL_UNUSED_PARAMETER - int *(*param)(void) _GL_UNUSED_PARAMETER - Other possible, but obscure and discouraged syntaxes: - int _GL_UNUSED_PARAMETER *(*param)(void) - _GL_UNUSED_PARAMETER int *(*param)(void) - */ -#ifndef _GL_UNUSED_PARAMETER -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) -# else -# define _GL_UNUSED_PARAMETER -# endif -#endif diff --git a/modules/selinux-h b/modules/selinux-h index 840106c107..2064eb939b 100644 --- a/modules/selinux-h +++ b/modules/selinux-h @@ -10,7 +10,7 @@ m4/selinux-selinux-h.m4 Depends-on: errno -unused-parameter +snippet/unused-parameter configure.ac: gl_HEADERS_SELINUX_SELINUX_H diff --git a/modules/snippet/unused-parameter b/modules/snippet/unused-parameter new file mode 100644 index 0000000000..1738eb86dd --- /dev/null +++ b/modules/snippet/unused-parameter @@ -0,0 +1,40 @@ +Description: +A C macro for declaring that specific function parameters are not used. + +Applicability: +all + +Files: +build-aux/snippet/unused-parameter.h + +Depends-on: + +configure.ac: + +Makefile.am: +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += unused-parameter.h +# The unused-parameter.h that gets inserted into generated .h files is the same +# as build-aux/snippet/unused-parameter.h, except that it has the copyright +# header cut off. +unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ + < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t + +UNUSED_PARAMETER_H=unused-parameter.h + +Include: + +License: +LGPLv2+ + +Maintainer: +Bruno Haible diff --git a/modules/unistr/base b/modules/unistr/base index b76031effd..ed8f8c750c 100644 --- a/modules/unistr/base +++ b/modules/unistr/base @@ -7,7 +7,7 @@ m4/libunistring-base.m4 Depends-on: unitypes -unused-parameter +snippet/unused-parameter stdbool inline diff --git a/modules/unused-parameter b/modules/unused-parameter deleted file mode 100644 index 196aa78e7c..0000000000 --- a/modules/unused-parameter +++ /dev/null @@ -1,40 +0,0 @@ -Description: -A C macro for declaring that specific function parameters are not used. - -Applicability: -all - -Files: -build-aux/unused-parameter.h - -Depends-on: - -configure.ac: - -Makefile.am: -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += unused-parameter.h -# The unused-parameter.h that gets inserted into generated .h files is the same -# as build-aux/unused-parameter.h, except that it has the copyright header cut -# off. -unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ - < $(top_srcdir)/build-aux/unused-parameter.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t - -UNUSED_PARAMETER_H=unused-parameter.h - -Include: - -License: -LGPLv2+ - -Maintainer: -Bruno Haible