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: remove redundant debug logging



details:   https://anonhg.NetBSD.org/src/rev/5a28232cc1aa
branches:  trunk
changeset: 1018926:5a28232cc1aa
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Feb 21 13:52:21 2021 +0000

description:
lint: remove redundant debug logging

In initstack_pop_nobrace, if anything happens to the initstack, it will
be logged by initstack_pop_item.

In init_using_expr, the address of the node is irrelevant, the node's
contents has already been logged above.

diffstat:

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

diffs (40 lines):

diff -r 8e4120278366 -r 5a28232cc1aa usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Sun Feb 21 13:35:37 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c        Sun Feb 21 13:52:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.82 2021/02/21 13:13:14 rillig Exp $ */
+/*     $NetBSD: init.c,v 1.83 2021/02/21 13:52:21 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.82 2021/02/21 13:13:14 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.83 2021/02/21 13:52:21 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -446,11 +446,9 @@
 {
 
        debug_enter();
-       debug_initstack();
        while (!initstk->i_brace && initstk->i_remaining == 0 &&
               !initstk->i_array_of_unknown_size)
                initstack_pop_item();
-       debug_initstack();
        debug_leave();
 }
 
@@ -798,7 +796,8 @@
        }
 
        initstk->i_remaining--;
-       debug_step("remaining=%d tn=%p", initstk->i_remaining, tn);
+       debug_step("%d elements remaining", initstk->i_remaining);
+
        /* Create a temporary node for the left side. */
        ln = tgetblk(sizeof (tnode_t));
        ln->tn_op = NAME;



Home | Main Index | Thread Index | Old Index