From: Daniel Stenberg Date: Wed, 7 Oct 2020 07:11:03 +0000 (+0200) Subject: checksrc: detect // comments on column 0 X-Git-Tag: curl-7_73_0~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7d8c89d47b459e104125dc900251d0bd07c6fd79;p=thirdparty%2Fcurl.git checksrc: detect // comments on column 0 Spotted while working on #6045 Closes #6048 --- diff --git a/lib/checksrc.pl b/lib/checksrc.pl index f9d076a2f8..78b9cef5bd 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"); }