]> sourceware.org Git - glibc.git/commitdiff
Fix implicit-fallthrough warnings in tst-setjmp.c.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 15 Feb 2019 13:44:17 +0000 (13:44 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 15 Feb 2019 13:44:17 +0000 (13:44 +0000)
Building the testsuite with -Wextra (together with
-Wno-cast-function-type -Wno-clobbered -Wno-expansion-to-defined
-Wno-missing-field-initializers -Wno-old-style-declaration
-Wno-shift-negative-value -Wno-sign-compare -Wno-type-limits
-Wno-unused-parameter, which reflect the set of -Wextra warnings for
which glibc itself is not currently clean on x86_64) showed up
implicit-fallthrough warnings in tst-setjmp.c.  Those warnings appear
to be false positives, arising from a function "jump" that calls
longjmp not itself being marked as noreturn; thus, this patch adds the
noreturn marking to that function to fix the warnings.

Tested for x86_64.

* setjmp/tst-setjmp.c (jump): Use __attribute__ ((__noreturn__)).

ChangeLog
setjmp/tst-setjmp.c

index d3560ade54b7ba0fa34b5288d58c93040d75a163..0c45e9a8524f28494941c046363965ea9e6eb0a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-15  Joseph Myers  <joseph@codesourcery.com>
+
+       * setjmp/tst-setjmp.c (jump): Use __attribute__ ((__noreturn__)).
+
 2019-02-14  Jan Kratochvil <jan.kratochvil@redhat.com>
 
        * scripts/test_printers_common.py: Set TERM to a known harmless
index e83e896ebea4069f3293d48b6d0a9926250fbd25..b377393ecf1c37938e8b71e4ec2fd96f30a64e11 100644 (file)
@@ -22,7 +22,7 @@
 static jmp_buf env;
 static int last_value = -1, lose = 0;
 
-static void
+static __attribute__ ((__noreturn__)) void
 jump (int val)
 {
   longjmp (env, val);
This page took 0.069178 seconds and 5 git commands to generate.