From 7d8c89d47b459e104125dc900251d0bd07c6fd79 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Oct 2020 09:11:03 +0200 Subject: [PATCH] checksrc: detect // comments on column 0 Spotted while working on #6045 Closes #6048 --- lib/checksrc.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); }