Module Name:    src
Committed By:   rillig
Date:           Sun Jun  9 16:53:07 UTC 2024

Modified Files:
        src/tests/usr.bin/xlint/lint1: emit.exp-ln
        src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: fix usage marker for nested function calls


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/emit.exp-ln
cvs rdiff -u -r1.646 -r1.647 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/emit.exp-ln
diff -u src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.14 src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.15
--- src/tests/usr.bin/xlint/lint1/emit.exp-ln:1.14	Sun Jun  9 16:49:40 2024
+++ src/tests/usr.bin/xlint/lint1/emit.exp-ln	Sun Jun  9 16:53:07 2024
@@ -87,6 +87,5 @@ S emit.c
 319 d 0.319 e 14used_and_using F1 I I
 320 d 0.320 e 9only_used F0 I
 325 c 0.325 u 14used_and_using f1 I I
-# FIXME: only_used's result is actually used, the 'i' for 'ignored' is wrong.
-325 c 0.325 i 9only_used f0 I
+325 c 0.325 u 9only_used f0 I
 323 d 0.323 dr 10only_using F0 I

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.646 src/usr.bin/xlint/lint1/tree.c:1.647
--- src/usr.bin/xlint/lint1/tree.c:1.646	Sun Jun  9 10:27:39 2024
+++ src/usr.bin/xlint/lint1/tree.c	Sun Jun  9 16:53:06 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.646 2024/06/09 10:27:39 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.647 2024/06/09 16:53:06 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.646 2024/06/09 10:27:39 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.647 2024/06/09 16:53:06 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -4649,7 +4649,7 @@ check_expr_misc(const tnode_t *tn, bool 
 		    discard, szof);
 		for (size_t i = 0, n = call->args_len; i < n; i++)
 			check_expr_misc(call->args[i],
-			    false, false, false, false, false, szof);
+			    true, false, false, false, false, szof);
 		return;
 	}
 

Reply via email to