Module Name:    src
Committed By:   rillig
Date:           Sat Feb 20 17:24:37 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: init.c

Log Message:
lint: define debug_named_member only in debug mode

In non-debug mode it was an expensive no-op.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/xlint/lint1/init.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xlint/lint1/init.c
diff -u src/usr.bin/xlint/lint1/init.c:1.71 src/usr.bin/xlint/lint1/init.c:1.72
--- src/usr.bin/xlint/lint1/init.c:1.71	Sat Feb 20 17:12:00 2021
+++ src/usr.bin/xlint/lint1/init.c	Sat Feb 20 17:24:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: init.c,v 1.71 2021/02/20 17:12:00 rillig Exp $	*/
+/*	$NetBSD: init.c,v 1.72 2021/02/20 17:24:37 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.71 2021/02/20 17:12:00 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.72 2021/02/20 17:24:37 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -206,6 +206,7 @@ pop_member(void)
 	}
 }
 
+#ifdef DEBUG
 static void
 debug_named_member(void)
 {
@@ -222,6 +223,9 @@ debug_named_member(void)
 	} while (name != namedmem);
 	debug_printf("\n");
 }
+#else
+#define debug_named_member() (void)0
+#endif
 
 /*
  * Initialize the initialisation stack by putting an entry for the variable

Reply via email to