1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00

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 96df6f2f8f
commit 001571c1ff

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