]> Savannah Git Hosting - gnulib.git/commitdiff
sigsegv: Avoid a gcc warning "declaration of 'sig' shadows a parameter".
authorBruno Haible <bruno@clisp.org>
Mon, 7 Jun 2021 02:24:50 +0000 (04:24 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 7 Jun 2021 02:24:50 +0000 (04:24 +0200)
Reported by Dmitry V. Levin <ldv@altlinux.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-06/msg00018.html>.

* lib/sigsegv.c (sigsegv_handler): Use a different local variable name
than 'sig'.

ChangeLog
lib/sigsegv.c

index 16132b1884635734432cf52dd6f844de3072aeca..7b040f25e985c99f59da6fe8beae2c20a965145a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-06-06  Bruno Haible  <bruno@clisp.org>
+
+       sigsegv: Avoid a gcc warning "declaration of 'sig' shadows a parameter".
+       Reported by Dmitry V. Levin <ldv@altlinux.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2021-06/msg00018.html>.
+       * lib/sigsegv.c (sigsegv_handler): Use a different local variable name
+       than 'sig'.
+
 2021-06-06  Bruno Haible  <bruno@clisp.org>
 
        scratch_buffer: Avoid conflict with prepr. macros owned by the system.
index 312f132b83a393efa87b212144125530c021db32..865dce0ec69e2476e1064b823a350a587eb652df 100644 (file)
@@ -1056,7 +1056,7 @@ sigsegv_handler (SIGSEGV_FAULT_HANDLER_ARGLIST)
           /* Handler declined responsibility for real.  */
 
           /* Remove ourselves and dump core.  */
-          SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);)
+          SIGSEGV_FOR_ALL_SIGNALS (signo, signal (signo, SIG_DFL);)
         }
 
 # if HAVE_STACK_OVERFLOW_RECOVERY
@@ -1151,7 +1151,7 @@ sigsegv_handler (int sig)
     }
 
   /* Remove ourselves and dump core.  */
-  SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);)
+  SIGSEGV_FOR_ALL_SIGNALS (signo, signal (signo, SIG_DFL);)
 }
 
 #endif