Module Name: src Committed By: rillig Date: Fri Apr 15 21:50:07 UTC 2022
Modified Files: src/tests/usr.bin/xlint/lint1: d_constant_conv2.c d_constant_conv2.exp d_type_conv1.c d_type_conv1.exp d_type_conv2.c d_type_conv2.exp d_type_conv3.c d_type_conv3.exp expr_fold.c expr_fold.exp msg_259.c msg_259_ilp32.c src/usr.bin/xlint/lint1: tree.c Log Message: lint: in C99 mode, do not warn about non-prototype conversions Message 259 is "argument #%d is converted from '%s' to '%s' due to prototype", and it is intended to warn about compatibility between traditional C where functions had no prototypes and standard C where functions have prototypes. Running lint in C99 mode is further away from traditional C than running lint in C90 mode, so that warning doesn't make sense for C99. There are still some inconsistencies in the 5 language version modes that lint offers: -t for traditional C (no option) for migrating traditional C to C90 -s for C90 code -S for C99 code -Ac11 for C11 code By disabling warning 259 in C99 mode, a typical NetBSD build produces 14.500 fewer warnings than before, of about 100.000 total. Message 259 overlaps with message 298 "conversion from '%s' to '%s' may lose accuracy, arg #%d", and in some cases of potentially lossy conversions, lint now produces none of these messages. In some other cases, these warnings were reported redundantly. The cases where message 298 makes sense will be added back later, as needed. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/d_constant_conv2.c \ src/tests/usr.bin/xlint/lint1/d_type_conv1.c \ src/tests/usr.bin/xlint/lint1/d_type_conv2.c cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv1.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv2.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv3.exp cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/d_type_conv3.c \ src/tests/usr.bin/xlint/lint1/expr_fold.c \ src/tests/usr.bin/xlint/lint1/expr_fold.exp \ src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c cvs rdiff -u -r1.19 -r1.20 src/tests/usr.bin/xlint/lint1/msg_259.c cvs rdiff -u -r1.426 -r1.427 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.