From patchwork Thu Feb 14 22:03:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 31484 Received: (qmail 92624 invoked by alias); 14 Feb 2019 22:03:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 92612 invoked by uid 89); 14 Feb 2019 22:03:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=longjmp, Hx-languages-length:1177 X-HELO: relay1.mentorg.com Date: Thu, 14 Feb 2019 22:03:49 +0000 From: Joseph Myers To: Subject: Fix implicit-fallthrough warnings in tst-setjmp.c Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 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. 2019-02-14 Joseph Myers * setjmp/tst-setjmp.c (jump): Use __attribute__ ((__noreturn__)). diff --git a/setjmp/tst-setjmp.c b/setjmp/tst-setjmp.c index e83e896ebe..b377393ecf 100644 --- a/setjmp/tst-setjmp.c +++ b/setjmp/tst-setjmp.c @@ -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);