Module Name: src Committed By: rillig Date: Fri Apr 9 22:08:14 UTC 2021
Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c d_c99_init.exp Log Message: tests/lint: demonstrate wrong warning when initializing a string To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.24 -r1.25 src/tests/usr.bin/xlint/lint1/d_c99_init.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/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.31 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.32 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.31 Fri Apr 2 12:16:50 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Fri Apr 9 22:08:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.31 2021/04/02 12:16:50 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.32 2021/04/09 22:08:14 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -385,3 +385,10 @@ struct point designator_for_scalar_in_st { .x = 3 }, /* expect: scalar type cannot use designator */ { [1] = 4 }, /* expect: scalar type cannot use designator */ }; + + +/* Seen in pcidevs_data.h, variable 'pci_words'. */ +const char string_initialized_with_braced_literal[] = { + /* FIXME: *//* expect+1: illegal combination of integer (char) and pointer (pointer to char) [183] */ + "initializer", +}; Index: src/tests/usr.bin/xlint/lint1/d_c99_init.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.24 src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.25 --- src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.24 Thu Apr 1 14:20:30 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.exp Fri Apr 9 22:08:14 2021 @@ -24,3 +24,4 @@ d_c99_init.c(377): error: too many struc d_c99_init.c(381): error: syntax error 'scalar type cannot use designator' [249] d_c99_init.c(385): error: syntax error 'scalar type cannot use designator' [249] d_c99_init.c(386): error: syntax error 'scalar type cannot use designator' [249] +d_c99_init.c(393): warning: illegal combination of integer (char) and pointer (pointer to char) [183]