Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/indent lint: move keyword 'continue' over to the oth...



details:   https://anonhg.NetBSD.org/src/rev/06d16b8efe09
branches:  trunk
changeset: 960096:06d16b8efe09
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 07 20:40:18 2021 +0000

description:
lint: move keyword 'continue' over to the other control flow keywords

No functional change since neither rw_jump nor rw_inline_or_restrict is
mentioned in any switch statement, and lint didn't find any other
suspicious enum operations.

diffstat:

 usr.bin/indent/indent_globs.h |   6 +++---
 usr.bin/indent/lexi.c         |  16 ++++++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)

diffs (76 lines):

diff -r 3b5fc592e042 -r 06d16b8efe09 usr.bin/indent/indent_globs.h
--- a/usr.bin/indent/indent_globs.h     Sun Mar 07 20:30:48 2021 +0000
+++ b/usr.bin/indent/indent_globs.h     Sun Mar 07 20:40:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: indent_globs.h,v 1.14 2021/03/07 20:30:48 rillig Exp $ */
+/*     $NetBSD: indent_globs.h,v 1.15 2021/03/07 20:40:18 rillig Exp $ */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -231,10 +231,10 @@
     rw_do_or_else,
     rw_switch,
     rw_case_or_default,
-    rw_break_or_goto_or_return,
+    rw_jump,
     rw_storage_class,
     rw_typedef,
-    rw_continue_or_inline_or_restrict
+    rw_inline_or_restrict
 };
 
 
diff -r 3b5fc592e042 -r 06d16b8efe09 usr.bin/indent/lexi.c
--- a/usr.bin/indent/lexi.c     Sun Mar 07 20:30:48 2021 +0000
+++ b/usr.bin/indent/lexi.c     Sun Mar 07 20:40:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lexi.c,v 1.21 2021/03/07 20:30:48 rillig Exp $ */
+/*     $NetBSD: lexi.c,v 1.22 2021/03/07 20:40:18 rillig Exp $ */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -46,7 +46,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: lexi.c,v 1.21 2021/03/07 20:30:48 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.22 2021/03/07 20:40:18 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
 #endif
@@ -84,12 +84,12 @@
     {"_Imaginary", rw_type},
     {"auto", rw_storage_class},
     {"bool", rw_type},
-    {"break", rw_break_or_goto_or_return},
+    {"break", rw_jump},
     {"case", rw_case_or_default},
     {"char", rw_type},
     {"complex", rw_type},
     {"const", rw_type},
-    {"continue", rw_continue_or_inline_or_restrict},
+    {"continue", rw_jump},
     {"default", rw_case_or_default},
     {"do", rw_do_or_else},
     {"double", rw_type},
@@ -99,16 +99,16 @@
     {"float", rw_type},
     {"for", rw_for_or_if_or_while},
     {"global", rw_type},
-    {"goto", rw_break_or_goto_or_return},
+    {"goto", rw_jump},
     {"if", rw_for_or_if_or_while},
     {"imaginary", rw_type},
-    {"inline", rw_continue_or_inline_or_restrict},
+    {"inline", rw_inline_or_restrict},
     {"int", rw_type},
     {"long", rw_type},
     {"offsetof", rw_offsetof},
     {"register", rw_storage_class},
-    {"restrict", rw_continue_or_inline_or_restrict},
-    {"return", rw_break_or_goto_or_return},
+    {"restrict", rw_inline_or_restrict},
+    {"return", rw_jump},
     {"short", rw_type},
     {"signed", rw_type},
     {"sizeof", rw_sizeof},



Home | Main Index | Thread Index | Old Index