]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Fix -DNDEBUG warning in _dl_start_args_adjust
authorFlorian Weimer <fweimer@redhat.com>
Tue, 28 Jun 2022 08:40:16 +0000 (10:40 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 28 Jun 2022 08:40:16 +0000 (10:40 +0200)
This is another blocker for building glibc with the default
-Werror setting and -DNDEBUG.

elf/rtld.c

index f5a3d1968fc5c2792778c053c48d20b01e24aa04..cbbaf4a33196512c92ad4b2f7657a850b411d8b4 100644 (file)
@@ -1307,7 +1307,7 @@ _dl_start_args_adjust (int skip_args)
     return;
 
   /* Sanity check.  */
-  intptr_t argc = (intptr_t) sp[0] - skip_args;
+  intptr_t argc __attribute__ ((unused)) = (intptr_t) sp[0] - skip_args;
   assert (argc == _dl_argc);
 
   /* Adjust argc on stack.  */