Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: align tests for argume...



details:   https://anonhg.NetBSD.org/src/rev/1749829678c1
branches:  trunk
changeset: 1022111:1749829678c1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jul 04 17:32:24 2021 +0000

description:
tests/lint: align tests for argument conversion to each other

diffstat:

 tests/usr.bin/xlint/lint1/msg_259.c   |  13 +++++++++----
 tests/usr.bin/xlint/lint1/msg_259.exp |   2 +-
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 1ece4bbd8ac0 -r 1749829678c1 tests/usr.bin/xlint/lint1/msg_259.c
--- a/tests/usr.bin/xlint/lint1/msg_259.c       Sun Jul 04 17:28:05 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_259.c       Sun Jul 04 17:32:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg_259.c,v 1.8 2021/06/29 13:58:13 rillig Exp $       */
+/*     $NetBSD: msg_259.c,v 1.9 2021/07/04 17:32:24 rillig Exp $       */
 # 3 "msg_259.c"
 
 // Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259]
@@ -15,11 +15,16 @@
 {
        farg_char(c);
        farg_int(c);
-       farg_long(c);           /* XXX: 259 on ILP32 but not LP64 */
+       /* No warning 259 on LP64, only on ILP32 */
+       farg_long(c);
+
        farg_char(i);           /* XXX: why no warning? */
        farg_int(i);
-       farg_long(i);           /* XXX: 259 on ILP32 but not LP64 */
+       /* No warning 259 on LP64, only on ILP32 */
+       farg_long(i);
+
        farg_char(l);           /* XXX: why no warning? */
-       farg_int(l);            /* expect: 259 */
+       /* expect+1: from 'long' to 'int' due to prototype [259] */
+       farg_int(l);
        farg_long(l);
 }
diff -r 1ece4bbd8ac0 -r 1749829678c1 tests/usr.bin/xlint/lint1/msg_259.exp
--- a/tests/usr.bin/xlint/lint1/msg_259.exp     Sun Jul 04 17:28:05 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_259.exp     Sun Jul 04 17:32:24 2021 +0000
@@ -1,1 +1,1 @@
-msg_259.c(23): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]
+msg_259.c(28): warning: argument #1 is converted from 'long' to 'int' due to prototype [259]



Home | Main Index | Thread Index | Old Index