Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/indent indent: fix Clang build everywhere but on amd64



details:   https://anonhg.NetBSD.org/src/rev/1a26a6cd49d9
branches:  trunk
changeset: 953976:1a26a6cd49d9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Mar 26 22:02:00 2021 +0000

description:
indent: fix Clang build everywhere but on amd64

No idea why Clang didn't complain about this on amd64, only on all other
platforms.

diffstat:

 usr.bin/indent/indent.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 15fb20e00a8e -r 1a26a6cd49d9 usr.bin/indent/indent.c
--- a/usr.bin/indent/indent.c   Fri Mar 26 21:18:29 2021 +0000
+++ b/usr.bin/indent/indent.c   Fri Mar 26 22:02:00 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: indent.c,v 1.59 2021/03/14 00:22:16 rillig Exp $       */
+/*     $NetBSD: indent.c,v 1.60 2021/03/26 22:02:00 rillig Exp $       */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -46,7 +46,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.59 2021/03/14 00:22:16 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.60 2021/03/26 22:02:00 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -546,7 +546,7 @@
        ps.ind_level = ps.i_l_follow = col / opt.indent_size;
 }
 
-static void
+static void __attribute__((__noreturn__))
 process_end_of_file(void)
 {
     if (s_lab != e_lab || s_code != e_code || s_com != e_com)
@@ -1269,7 +1269,7 @@
      */
 }
 
-static void
+static void __attribute__((__noreturn__))
 main_loop(void)
 {
     token_type type_code;
@@ -1313,7 +1313,7 @@
 
        if (type_code == end_of_file) {
            process_end_of_file();
-           return;
+           /* NOTREACHED */
        }
 
        if (



Home | Main Index | Thread Index | Old Index