checksrc: add missing semicolon, fix IFDEFSINGLE capture group

Pointed out by GitHub Code Quality

Closes #21435
This commit is contained in:
Viktor Szakats 2026-04-24 10:07:40 +02:00
parent 2f37943406
commit 0d3d9f2222
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View file

@ -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");
}