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: clean up
details: https://anonhg.NetBSD.org/src/rev/2f4cf76e991a
branches: trunk
changeset: 377350:2f4cf76e991a
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jul 08 12:07:21 2023 +0000
description:
lint: clean up
PUSH nodes are not marked as binary, yet they have a left and a right
operand.
If none of the queries is enabled, omit the query from the debug log.
diffstat:
usr.bin/xlint/lint1/debug.c | 7 ++++---
usr.bin/xlint/lint1/tree.c | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r 9943d5a746ac -r 2f4cf76e991a usr.bin/xlint/lint1/debug.c
--- a/usr.bin/xlint/lint1/debug.c Sat Jul 08 11:42:03 2023 +0000
+++ b/usr.bin/xlint/lint1/debug.c Sat Jul 08 12:07:21 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.46 2023/07/02 18:28:15 rillig Exp $ */
+/* $NetBSD: debug.c,v 1.47 2023/07/08 12:07:21 rillig Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: debug.c,v 1.46 2023/07/02 18:28:15 rillig Exp $");
+__RCSID("$NetBSD: debug.c,v 1.47 2023/07/08 12:07:21 rillig Exp $");
#endif
#include <stdlib.h>
@@ -227,7 +227,8 @@ debug_node(const tnode_t *tn) // NOLINT(
lint_assert(tn->tn_left != NULL);
debug_node(tn->tn_left);
if (op != INCBEF && op != INCAFT
- && op != DECBEF && op != DECAFT)
+ && op != DECBEF && op != DECAFT
+ && op != PUSH)
lint_assert(is_binary(tn) == (tn->tn_right != NULL));
if (tn->tn_right != NULL)
debug_node(tn->tn_right);
diff -r 9943d5a746ac -r 2f4cf76e991a usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Sat Jul 08 11:42:03 2023 +0000
+++ b/usr.bin/xlint/lint1/tree.c Sat Jul 08 12:07:21 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.550 2023/07/08 09:35:35 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.551 2023/07/08 12:07:21 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.550 2023/07/08 09:35:35 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.551 2023/07/08 12:07:21 rillig Exp $");
#endif
#include <float.h>
@@ -3465,7 +3465,7 @@ convert_integer_from_integer(op_t op, in
}
}
- if (is_uinteger(nt) != is_uinteger(ot))
+ if (any_query_enabled && is_uinteger(nt) != is_uinteger(ot))
/* implicit conversion changes sign from '%s' to '%s' */
query_message(3, type_name(tn->tn_type), type_name(tp));
}
Home |
Main Index |
Thread Index |
Old Index