Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: rillig
Date: Fri Aug 20 05:45:20 UTC 2021
Modified Files:
src/tests/usr.bin/mkdep: t_findcc.sh
src/usr.bin/mkdep: findcc.c findcc.h mkdep.c
src/usr.bin/xlint/xlint: xlint.c
Log Message:
mkdep: make argument of findcc const
Previously, findcc modified its argument string, even though it had been
declared as 'const char *'. This triggered a lint warning that "strchr
effectively discards 'const char *' from argument", in fact, this code
caused the lint check to be implemented in the first place.
The first attempt at fixing it by removing the 'const' from the
parameter type was a bad idea since it made the API of that function
more complicated.
Revert back to making the parameter a 'const char *' and duplicate that
string internally as necessary. Add a few more tests for absolute
pathnames since these had been missing before. There are no tests yet
for snprintf with too long strings, but the current change does not
modify that part of the code.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/mkdep/t_findcc.sh
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/mkdep/findcc.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/mkdep/findcc.h
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/mkdep/mkdep.c
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/xlint/xlint/xlint.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index