diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-10-07 09:11:03 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-10-07 09:13:00 +0200 |
commit | c0fec67e7809899bcde745b4ea3053305933172d (patch) | |
tree | 50c09a451d26c4a84be30eb2fd2dd67ce916b8f0 | |
parent | ec1cb755bf859fae0ae5cb80a577067b8e76947e (diff) | |
download | curl-bagder/checksrc-cpp-col0.tar.gz |
checksrc: detect // comments on column 0bagder/checksrc-cpp-col0
Spotted while working on #6045
-rwxr-xr-x | lib/checksrc.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl index f9d076a2f..78b9cef5b 100755 --- a/lib/checksrc.pl +++ b/lib/checksrc.pl @@ -442,7 +442,7 @@ sub scanfile { # crude attempt to detect // comments without too many false # positives - if($l =~ /^([^"\*]*)[^:"]\/\//) { + if($l =~ /^(([^"\*]*)[^:"]|)\/\//) { checkwarn("CPPCOMMENTS", $line, length($1), $file, $l, "\/\/ comment"); } |