Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/lint1 lint: fix lint warning 'expression has n...



details:   https://anonhg.NetBSD.org/src/rev/0557a8887f34
branches:  trunk
changeset: 980859:0557a8887f34
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Feb 20 19:56:44 2021 +0000

description:
lint: fix lint warning 'expression has null effect'

diffstat:

 usr.bin/xlint/lint1/init.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (53 lines):

diff -r 5dce15790cbb -r 0557a8887f34 usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Sat Feb 20 19:35:07 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c        Sat Feb 20 19:56:44 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.74 2021/02/20 19:10:38 rillig Exp $ */
+/*     $NetBSD: init.c,v 1.75 2021/02/20 19:56:44 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.74 2021/02/20 19:10:38 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.75 2021/02/20 19:56:44 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -113,11 +113,11 @@
 static bool    initstack_string(tnode_t *);
 
 #ifndef DEBUG
-#define debug_printf(fmt, ...) (void)0
-#define debug_indent() (void)0
-#define debug_enter(a) (void)0
-#define debug_step(fmt, ...) (void)0
-#define debug_leave(a) (void)0
+#define debug_printf(fmt, ...) do { } while (false)
+#define debug_indent()         do { } while (false)
+#define debug_enter(a)         do { } while (false)
+#define debug_step(fmt, ...)   do { } while (false)
+#define debug_leave(a)         do { } while (false)
 #else
 static int debug_ind = 0;
 
@@ -224,7 +224,7 @@
        debug_printf("\n");
 }
 #else
-#define debug_named_member() (void)0
+#define debug_named_member()   do { } while (false)
 #endif
 
 #ifdef DEBUG
@@ -257,7 +257,7 @@
        }
 }
 #else
-#define debug_initstack() (void)0
+#define debug_initstack()      do { } while (false)
 #endif
 
 /*



Home | Main Index | Thread Index | Old Index