checksrc: warn for leading spaces before the preprocessor hash

Fix the 40+ fallouts

Closes #20282
This commit is contained in:
Daniel Stenberg 2026-01-13 09:23:21 +01:00
parent dac98ccfa2
commit f057ed05be
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 55 additions and 46 deletions

View file

@ -218,6 +218,9 @@ void startfunc(int a, int b) {
./%LOGDIR/code1185.c:65:1: warning: use ifdef/ifndef for single macro checks (IFDEFSINGLE)
#if ! defined(__macro_10)
^
./%LOGDIR/code1185.c:65:1: warning: space before preprocessor hash (CPPSPACE)
#if ! defined(__macro_10)
^
./%LOGDIR/code1185.c:71:2: warning: // comment (CPPCOMMENTS)
// CPP comment ?
^
@ -227,7 +230,7 @@ void startfunc(int a, int b) {
./%LOGDIR/code1185.c:1:1: error: Missing closing comment (OPENCOMMENT)
%SP
^
checksrc: 0 errors and 44 warnings
checksrc: 0 errors and 45 warnings
</stdout>
<errorcode>
5