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: define debug_named_member only in ...
details: https://anonhg.NetBSD.org/src/rev/52c04ee7a32b
branches: trunk
changeset: 980846:52c04ee7a32b
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Feb 20 17:24:37 2021 +0000
description:
lint: define debug_named_member only in debug mode
In non-debug mode it was an expensive no-op.
diffstat:
usr.bin/xlint/lint1/init.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 9daadb71d007 -r 52c04ee7a32b usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c Sat Feb 20 17:12:00 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c Sat Feb 20 17:24:37 2021 +0000
@@ -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 @@
}
}
+#ifdef DEBUG
static void
debug_named_member(void)
{
@@ -222,6 +223,9 @@
} 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
Home |
Main Index |
Thread Index |
Old Index