Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint lint: remove redundant CONSTCOND



details:   https://anonhg.NetBSD.org/src/rev/682624eb8eb2
branches:  trunk
changeset: 982613:682624eb8eb2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Apr 18 17:47:32 2021 +0000

description:
lint: remove redundant CONSTCOND

In do-while-0 loops, these are no longer needed since tree.c 1.202 from
2021-01-31.

diffstat:

 usr.bin/xlint/common/tyname.c |   6 +++---
 usr.bin/xlint/lint1/lint1.h   |  10 +++++-----
 usr.bin/xlint/lint1/tree.c    |   6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diffs (99 lines):

diff -r 3b50e5636207 -r 682624eb8eb2 usr.bin/xlint/common/tyname.c
--- a/usr.bin/xlint/common/tyname.c     Sun Apr 18 17:36:18 2021 +0000
+++ b/usr.bin/xlint/common/tyname.c     Sun Apr 18 17:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tyname.c,v 1.39 2021/04/10 18:36:27 rillig Exp $       */
+/*     $NetBSD: tyname.c,v 1.40 2021/04/18 17:47:32 rillig Exp $       */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tyname.c,v 1.39 2021/04/10 18:36:27 rillig Exp $");
+__RCSID("$NetBSD: tyname.c,v 1.40 2021/04/18 17:47:32 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -54,7 +54,7 @@
        do { \
                (void)warnx("%s, %d: " fmt, __FILE__, __LINE__, ##args); \
                abort(); \
-       } while (/*CONSTCOND*/false)
+       } while (false)
 #endif
 
 /* A tree of strings. */
diff -r 3b50e5636207 -r 682624eb8eb2 usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h       Sun Apr 18 17:36:18 2021 +0000
+++ b/usr.bin/xlint/lint1/lint1.h       Sun Apr 18 17:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.99 2021/04/18 10:09:49 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.100 2021/04/18 17:47:32 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -76,7 +76,7 @@
                curr_pos.p_uniq++;                                      \
                if (curr_pos.p_file == csrc_pos.p_file)                 \
                        csrc_pos.p_uniq++;                              \
-       } while (/*CONSTCOND*/false)
+       } while (false)
 
 /*
  * Strings cannot be referenced to simply by a pointer to its first
@@ -456,7 +456,7 @@
        do {                                                            \
                if (!(cond))                                            \
                        assert_failed(__FILE__, __LINE__, __func__, #cond); \
-       } while (/*CONSTCOND*/false)
+       } while (false)
 
 #ifdef BLKDEBUG
 #define ZERO   0xa5
@@ -480,7 +480,7 @@
        do {                                                            \
                check_printf(__CONCAT(MSG_, msgid), ##args);            \
                (func)(msgid, pos, ##args);                             \
-       } while (/*CONSTCOND*/false)
+       } while (false)
 
 #  define error_at(msgid, pos, args...) \
        wrap_check_printf_at(error_at, msgid, pos, ##args)
@@ -493,7 +493,7 @@
        do {                                                            \
                check_printf(__CONCAT(MSG_, msgid), ##args);            \
                (func)(msgid, ##args);                                  \
-       } while (/*CONSTCOND*/false)
+       } while (false)
 
 #  define error(msgid, args...) wrap_check_printf(error, msgid, ##args)
 #  define warning(msgid, args...) wrap_check_printf(warning, msgid, ##args)
diff -r 3b50e5636207 -r 682624eb8eb2 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Sun Apr 18 17:36:18 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Sun Apr 18 17:47:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.278 2021/04/18 09:53:03 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.279 2021/04/18 17:47:32 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.278 2021/04/18 09:53:03 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.279 2021/04/18 17:47:32 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -4154,7 +4154,7 @@
        strg1->F = xrealloc(strg1->F, len * sizeof(*strg1->F)); \
        (void)memcpy(strg1->F + len1, strg2->F, len2 * sizeof(*strg1->F)); \
        free(strg2->F); \
-    } while (/*CONSTCOND*/false)
+    } while (false)
 
        if (strg1->st_tspec == CHAR)
                COPY(st_cp);



Home | Main Index | Thread Index | Old Index