diff options
author | Zack Weinberg <zackw@panix.com> | 2017-04-03 08:45:41 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-04-07 07:52:29 -0400 |
commit | 0f3be8721a86299600eae2d266934f661bf7c990 (patch) | |
tree | 51085f8f01905cd53c041869b25ed3688ad59abd /posix | |
parent | aeacb9f9127cff0ed099026156ca35c025f343b7 (diff) | |
download | glibc-0f3be8721a86299600eae2d266934f661bf7c990.tar.gz glibc-0f3be8721a86299600eae2d266934f661bf7c990.tar.xz glibc-0f3be8721a86299600eae2d266934f661bf7c990.zip |
getopt: merge _GL_UNUSED annotations from gnulib
gnulib now has annotations on at least some functions to cater to compilation with -Wunused-parameter. In order to follow suit cleanly, I've added to libc-symbols.h some of the _GL_* macros that gnulib-common.m4 puts into config.h. (I don't think they belong in sys/cdefs.h, at least not without further thought.) At this point all gnulib-side changes to getopt.c have been merged. * include/libc-symbols.h: For gnulib compatibility, define _GL_UNUSED, _GL_UNUSED_LABEL, _GL_ATTRIBUTE_PURE, and _GL_ATTRIBUTE_CONST. * posix/getopt.c (_getopt_initialize): Mark argc and argv parameters with _GL_UNUSED.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/getopt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/posix/getopt.c b/posix/getopt.c index 79c81ae2f1..6671787b6f 100644 --- a/posix/getopt.c +++ b/posix/getopt.c @@ -379,7 +379,8 @@ process_long_option (int argc, char **argv, const char *optstring, /* Initialize internal data upon the first call to getopt. */ static const char * -_getopt_initialize (int argc, char **argv, const char *optstring, +_getopt_initialize (int argc _GL_UNUSED, + char **argv _GL_UNUSED, const char *optstring, struct _getopt_data *d, int posixly_correct) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 |