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:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user