diff options
| author | rillig <rillig@NetBSD.org> | 2023-07-08 12:07:21 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2023-07-08 12:07:21 +0000 |
| commit | c8d1c1b1b539f64aceb2773449908eff62ba034d (patch) | |
| tree | db802aa0e56ea1de5013a26d0b9edc08baf81550 /usr.bin | |
| parent | 6f3ccd3897bf1c8776cb0cf812310ddd754880ae (diff) | |
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 (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/xlint/lint1/debug.c | 7 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/tree.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/xlint/lint1/debug.c b/usr.bin/xlint/lint1/debug.c index fbda15ed2bc..10d2ac6fa9e 100644 --- a/usr.bin/xlint/lint1/debug.c +++ b/usr.bin/xlint/lint1/debug.c @@ -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(misc-no-recursion) 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 --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c index d861d8ba158..d723d631bc7 100644 --- a/usr.bin/xlint/lint1/tree.c +++ b/usr.bin/xlint/lint1/tree.c @@ -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, int arg, tspec_t nt, tspec_t ot, } } - 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)); } |
