checksrc: add missing semicolon, fix `IFDEFSINGLE` capture group
No binary (build failed)
—
(log yok)
| @@ -554,7 +554,7 @@ sub scanfile { | |
| # check for !checksrc! commands | |
| if($l =~ /\!checksrc\! (.*)/) { | |
| my $cmd = $1; | |
| - | checksrc($cmd, $line, $file, $l) |
| + | checksrc($cmd, $line, $file, $l); |
| } | |
| if($l =~ /^#line (\d+) \"([^\"]*)\"/) { | |
| @@ -670,7 +670,7 @@ sub scanfile { | |
| $line, length($1), $file, $l, "\/\/ comment"); | |
| } | |
| - | if($l =~ /^\s*#\s*if\s+!?\s*defined\([a-zA-Z0-9_]+\)$/) { |
| + | if($l =~ /^(\s*#\s*if\s+!?\s*defined\()[a-zA-Z0-9_]+\)$/) { |
| checkwarn("IFDEFSINGLE", | |
| $line, length($1), $file, $l, "use ifdef/ifndef for single macro checks"); | |
| } | |
| @@ -215,12 +215,12 @@ void startfunc(int a, int b) { | |
| ./%LOGDIR/code1185.c:62:25: warning: use of alsobad is banned (BANNEDFUNC) | |
| *buffer_len = (ssize_t)alsobad((char *)buffer, NULL, 16); | |
| ^ | |
| - | ./%LOGDIR/code1185.c:64:1: warning: use ifdef/ifndef for single macro checks (IFDEFSINGLE) |
| + | ./%LOGDIR/code1185.c:64:14: warning: use ifdef/ifndef for single macro checks (IFDEFSINGLE) |
| # if defined(SINGLE_MACRO) | |
| - | ^ |
| - | ./%LOGDIR/code1185.c:65:1: warning: use ifdef/ifndef for single macro checks (IFDEFSINGLE) |
| + | ^ |
| + | ./%LOGDIR/code1185.c:65:17: 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) | |
| ^ | |