Module Name:    src
Committed By:   rillig
Date:           Tue Aug 31 19:26:23 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_259.c msg_259.exp msg_259_c90.c
            msg_259_c90.exp msg_259_ilp32.c msg_259_ilp32.exp

Log Message:
tests/lint: add cross-references to message 297

The check for lossy integer conversions is already implemented, it's
just not activated in the default NetBSD build.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/usr.bin/xlint/lint1/msg_259.c
cvs rdiff -u -r1.12 -r1.13 src/tests/usr.bin/xlint/lint1/msg_259.exp
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_259_c90.c \
    src/tests/usr.bin/xlint/lint1/msg_259_c90.exp \
    src/tests/usr.bin/xlint/lint1/msg_259_ilp32.exp
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_259_ilp32.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/msg_259.c
diff -u src/tests/usr.bin/xlint/lint1/msg_259.c:1.15 src/tests/usr.bin/xlint/lint1/msg_259.c:1.16
--- src/tests/usr.bin/xlint/lint1/msg_259.c:1.15	Tue Aug 31 18:59:26 2021
+++ src/tests/usr.bin/xlint/lint1/msg_259.c	Tue Aug 31 19:26:23 2021
@@ -1,8 +1,13 @@
-/*	$NetBSD: msg_259.c,v 1.15 2021/08/31 18:59:26 rillig Exp $	*/
+/*	$NetBSD: msg_259.c,v 1.16 2021/08/31 19:26:23 rillig Exp $	*/
 # 3 "msg_259.c"
 
 // Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259]
 
+/*
+ * See also msg_297, but that requires the flags -a -p -P, which are not
+ * enabled in the default NetBSD build.
+ */
+
 /* lint1-only-if: lp64 */
 /* lint1-extra-flags: -h */
 

Index: src/tests/usr.bin/xlint/lint1/msg_259.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_259.exp:1.12 src/tests/usr.bin/xlint/lint1/msg_259.exp:1.13
--- src/tests/usr.bin/xlint/lint1/msg_259.exp:1.12	Tue Aug 31 18:59:26 2021
+++ src/tests/usr.bin/xlint/lint1/msg_259.exp	Tue Aug 31 19:26:23 2021
@@ -1,24 +1,24 @@
-msg_259.c(32): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
-msg_259.c(52): warning: argument #1 is converted from 'int' to 'unsigned int' due to prototype [259]
-msg_259.c(55): warning: argument #1 is converted from 'long' to 'unsigned int' due to prototype [259]
-msg_259.c(58): warning: argument #1 is converted from 'long long' to 'unsigned int' due to prototype [259]
-msg_259.c(67): warning: argument #1 is converted from 'long' to 'unsigned long' due to prototype [259]
-msg_259.c(69): warning: argument #1 is converted from 'long long' to 'unsigned long' due to prototype [259]
-msg_259.c(78): warning: argument #1 is converted from 'long' to 'unsigned long long' due to prototype [259]
-msg_259.c(81): warning: argument #1 is converted from 'long long' to 'unsigned long long' due to prototype [259]
-msg_259.c(88): warning: argument #1 is converted from 'unsigned int' to 'int' due to prototype [259]
-msg_259.c(90): warning: argument #1 is converted from 'unsigned long' to 'int' due to prototype [259]
-msg_259.c(92): warning: argument #1 is converted from 'unsigned long long' to 'int' due to prototype [259]
-msg_259.c(95): warning: argument #1 is converted from 'unsigned long' to 'long' due to prototype [259]
-msg_259.c(97): warning: argument #1 is converted from 'unsigned long long' to 'long' due to prototype [259]
-msg_259.c(100): warning: argument #1 is converted from 'unsigned long' to 'long long' due to prototype [259]
-msg_259.c(102): warning: argument #1 is converted from 'unsigned long long' to 'long long' due to prototype [259]
-msg_259.c(110): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
-msg_259.c(112): warning: argument #1 is converted from 'long long' to 'int' due to prototype [259]
-msg_259.c(116): warning: argument #1 is converted from 'long long' to 'long' due to prototype [259]
-msg_259.c(119): warning: argument #1 is converted from 'long' to 'long long' due to prototype [259]
-msg_259.c(128): warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259]
-msg_259.c(130): warning: argument #1 is converted from 'unsigned long long' to 'unsigned int' due to prototype [259]
-msg_259.c(134): warning: argument #1 is converted from 'unsigned long long' to 'unsigned long' due to prototype [259]
-msg_259.c(137): warning: argument #1 is converted from 'unsigned long' to 'unsigned long long' due to prototype [259]
-msg_259.c(151): warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259]
+msg_259.c(37): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
+msg_259.c(57): warning: argument #1 is converted from 'int' to 'unsigned int' due to prototype [259]
+msg_259.c(60): warning: argument #1 is converted from 'long' to 'unsigned int' due to prototype [259]
+msg_259.c(63): warning: argument #1 is converted from 'long long' to 'unsigned int' due to prototype [259]
+msg_259.c(72): warning: argument #1 is converted from 'long' to 'unsigned long' due to prototype [259]
+msg_259.c(74): warning: argument #1 is converted from 'long long' to 'unsigned long' due to prototype [259]
+msg_259.c(83): warning: argument #1 is converted from 'long' to 'unsigned long long' due to prototype [259]
+msg_259.c(86): warning: argument #1 is converted from 'long long' to 'unsigned long long' due to prototype [259]
+msg_259.c(93): warning: argument #1 is converted from 'unsigned int' to 'int' due to prototype [259]
+msg_259.c(95): warning: argument #1 is converted from 'unsigned long' to 'int' due to prototype [259]
+msg_259.c(97): warning: argument #1 is converted from 'unsigned long long' to 'int' due to prototype [259]
+msg_259.c(100): warning: argument #1 is converted from 'unsigned long' to 'long' due to prototype [259]
+msg_259.c(102): warning: argument #1 is converted from 'unsigned long long' to 'long' due to prototype [259]
+msg_259.c(105): warning: argument #1 is converted from 'unsigned long' to 'long long' due to prototype [259]
+msg_259.c(107): warning: argument #1 is converted from 'unsigned long long' to 'long long' due to prototype [259]
+msg_259.c(115): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
+msg_259.c(117): warning: argument #1 is converted from 'long long' to 'int' due to prototype [259]
+msg_259.c(121): warning: argument #1 is converted from 'long long' to 'long' due to prototype [259]
+msg_259.c(124): warning: argument #1 is converted from 'long' to 'long long' due to prototype [259]
+msg_259.c(133): warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259]
+msg_259.c(135): warning: argument #1 is converted from 'unsigned long long' to 'unsigned int' due to prototype [259]
+msg_259.c(139): warning: argument #1 is converted from 'unsigned long long' to 'unsigned long' due to prototype [259]
+msg_259.c(142): warning: argument #1 is converted from 'unsigned long' to 'unsigned long long' due to prototype [259]
+msg_259.c(156): warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259]

Index: src/tests/usr.bin/xlint/lint1/msg_259_c90.c
diff -u src/tests/usr.bin/xlint/lint1/msg_259_c90.c:1.1 src/tests/usr.bin/xlint/lint1/msg_259_c90.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_259_c90.c:1.1	Tue Aug 31 18:59:26 2021
+++ src/tests/usr.bin/xlint/lint1/msg_259_c90.c	Tue Aug 31 19:26:23 2021
@@ -1,8 +1,13 @@
-/*	$NetBSD: msg_259_c90.c,v 1.1 2021/08/31 18:59:26 rillig Exp $	*/
+/*	$NetBSD: msg_259_c90.c,v 1.2 2021/08/31 19:26:23 rillig Exp $	*/
 # 3 "msg_259_c90.c"
 
 /* Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259] */
 
+/*
+ * See also msg_297, but that requires the flags -a -p -P, which are not
+ * enabled in the default NetBSD build.
+ */
+
 /* lint1-only-if: lp64 */
 /* XXX: The flag '-s' suppresses all warnings.  Why? */
 /* lint1-flags: -h -w */
Index: src/tests/usr.bin/xlint/lint1/msg_259_c90.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_259_c90.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_259_c90.exp:1.2
--- src/tests/usr.bin/xlint/lint1/msg_259_c90.exp:1.1	Tue Aug 31 18:59:26 2021
+++ src/tests/usr.bin/xlint/lint1/msg_259_c90.exp	Tue Aug 31 19:26:23 2021
@@ -1,10 +1,10 @@
-msg_259_c90.c(32): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
-msg_259_c90.c(52): warning: argument #1 is converted from 'int' to 'unsigned int' due to prototype [259]
-msg_259_c90.c(55): warning: argument #1 is converted from 'long' to 'unsigned int' due to prototype [259]
-msg_259_c90.c(64): warning: argument #1 is converted from 'long' to 'unsigned long' due to prototype [259]
-msg_259_c90.c(71): warning: argument #1 is converted from 'unsigned int' to 'int' due to prototype [259]
-msg_259_c90.c(73): warning: argument #1 is converted from 'unsigned long' to 'int' due to prototype [259]
-msg_259_c90.c(76): warning: argument #1 is converted from 'unsigned long' to 'long' due to prototype [259]
-msg_259_c90.c(84): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
-msg_259_c90.c(94): warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259]
-msg_259_c90.c(109): warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259]
+msg_259_c90.c(37): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
+msg_259_c90.c(57): warning: argument #1 is converted from 'int' to 'unsigned int' due to prototype [259]
+msg_259_c90.c(60): warning: argument #1 is converted from 'long' to 'unsigned int' due to prototype [259]
+msg_259_c90.c(69): warning: argument #1 is converted from 'long' to 'unsigned long' due to prototype [259]
+msg_259_c90.c(76): warning: argument #1 is converted from 'unsigned int' to 'int' due to prototype [259]
+msg_259_c90.c(78): warning: argument #1 is converted from 'unsigned long' to 'int' due to prototype [259]
+msg_259_c90.c(81): warning: argument #1 is converted from 'unsigned long' to 'long' due to prototype [259]
+msg_259_c90.c(89): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
+msg_259_c90.c(99): warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259]
+msg_259_c90.c(114): warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259]
Index: src/tests/usr.bin/xlint/lint1/msg_259_ilp32.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_259_ilp32.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_259_ilp32.exp:1.2
--- src/tests/usr.bin/xlint/lint1/msg_259_ilp32.exp:1.1	Tue Jun 29 09:19:17 2021
+++ src/tests/usr.bin/xlint/lint1/msg_259_ilp32.exp	Tue Aug 31 19:26:23 2021
@@ -1,3 +1,3 @@
-msg_259_ilp32.c(19): warning: argument #1 is converted from 'char' to 'long' due to prototype [259]
-msg_259_ilp32.c(24): warning: argument #1 is converted from 'int' to 'long' due to prototype [259]
-msg_259_ilp32.c(28): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
+msg_259_ilp32.c(24): warning: argument #1 is converted from 'char' to 'long' due to prototype [259]
+msg_259_ilp32.c(29): warning: argument #1 is converted from 'int' to 'long' due to prototype [259]
+msg_259_ilp32.c(33): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]

Index: src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c
diff -u src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c:1.3 src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c:1.3	Sat Aug 21 11:50:57 2021
+++ src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c	Tue Aug 31 19:26:23 2021
@@ -1,8 +1,13 @@
-/*	$NetBSD: msg_259_ilp32.c,v 1.3 2021/08/21 11:50:57 rillig Exp $	*/
+/*	$NetBSD: msg_259_ilp32.c,v 1.4 2021/08/31 19:26:23 rillig Exp $	*/
 # 3 "msg_259_ilp32.c"
 
 // Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259]
 
+/*
+ * See also msg_297, but that requires the flags -a -p -P, which are not
+ * enabled in the default NetBSD build.
+ */
+
 /* lint1-only-if: ilp32 */
 /* lint1-extra-flags: -h */
 

Reply via email to