Module Name: src Committed By: rillig Date: Sun Dec 5 17:00:02 UTC 2021
Modified Files: src/usr.bin/make: var.c Log Message: make: fix types for modifier ':O' (since today) In var.c 1.962 from 2021-12-05, the type of the array to be sorted changed from 'const char *' to 'Substring'. The code still worked since the first member of Substring is 'const char *start', but that was pure luck. Fix the type assumptions in the comparison functions. Add an assertion that the words must be null-terminated since the comparison functions currently assume this. This kind of inconsistency may be possible to detect using static analysis, but NetBSD's lint is currently too limited for that. To detect this, it would have to analyze each possible comparison function and remember the assumed type. This type could then be compared to the argument type of a function call to qsort or bsearch. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.963 -r1.964 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.