Module Name: src Committed By: rillig Date: Sun Jul 4 17:32:24 UTC 2021
Modified Files: src/tests/usr.bin/xlint/lint1: msg_259.c msg_259.exp Log Message: tests/lint: align tests for argument conversion to each other To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_259.c cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_259.exp 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.8 src/tests/usr.bin/xlint/lint1/msg_259.c:1.9 --- src/tests/usr.bin/xlint/lint1/msg_259.c:1.8 Tue Jun 29 13:58:13 2021 +++ src/tests/usr.bin/xlint/lint1/msg_259.c Sun Jul 4 17:32:24 2021 @@ -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 @@ example(char c, int i, long l) { 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); } Index: src/tests/usr.bin/xlint/lint1/msg_259.exp diff -u src/tests/usr.bin/xlint/lint1/msg_259.exp:1.6 src/tests/usr.bin/xlint/lint1/msg_259.exp:1.7 --- src/tests/usr.bin/xlint/lint1/msg_259.exp:1.6 Tue Jun 29 09:19:17 2021 +++ src/tests/usr.bin/xlint/lint1/msg_259.exp Sun Jul 4 17:32:24 2021 @@ -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]