]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Merge _GL_UNUSED C23 patch from Gnulib
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 24 Aug 2022 04:16:39 +0000 (21:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 24 Aug 2022 04:58:39 +0000 (21:58 -0700)
* posix/getopt.c (_getopt_initialize):
* sysdeps/posix/tempname.c (try_dir, try_nocreate):
Put _GL_UNUSED before args instead of after.
This makes no difference for glibc.
It is needed for Gnulib when being compiled on
non-GCC C23 compilers.

posix/getopt.c
sysdeps/posix/tempname.c

index e9661c79faa8920253bc37747b193d1bdcb288ef..a160a4e3bd8d9d119e79b39baa138bbb9a9bd5b8 100644 (file)
@@ -377,8 +377,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 _GL_UNUSED,
-                   char **argv _GL_UNUSED, const char *optstring,
+_getopt_initialize (_GL_UNUSED int argc,
+                   _GL_UNUSED char **argv, const char *optstring,
                    struct _getopt_data *d, int posixly_correct)
 {
   /* Start processing options with ARGV-element 1 (since ARGV-element 0
index ebd2a43951f0cd0b2c8100b42c3a9f10e824d855..60f8541085091934230e0adf96ce8a241531ca18 100644 (file)
@@ -181,13 +181,13 @@ try_file (char *tmpl, void *flags)
 }
 
 static int
-try_dir (char *tmpl, void *flags _GL_UNUSED)
+try_dir (char *tmpl, _GL_UNUSED void *flags)
 {
   return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
 }
 
 static int
-try_nocreate (char *tmpl, void *flags _GL_UNUSED)
+try_nocreate (char *tmpl, _GL_UNUSED void *flags)
 {
   struct_stat64 st;