Re: [PATCH v2] kbuild: uapi: Strip comments before size type check

From: Andreas Schwab

Date: Mon Oct 06 2025 - 08:48:18 EST


On Okt 06 2025, Geert Uytterhoeven wrote:

> diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
> index 21c2fb9520e6af2d..16c238aadfebb061 100755
> --- a/usr/include/headers_check.pl
> +++ b/usr/include/headers_check.pl
> @@ -155,6 +155,8 @@ sub check_sizetypes
> if (my $included = ($line =~ /^\s*#\s*include\s+[<"](\S+)[>"]/)[0]) {
> check_include_typesh($included);
> }
> + # strip comments (single-line only)
> + $line =~ s@\/\*.*?\*\/@@;

I don't think you need to quote the forward slashes in the regexp.

--
Andreas Schwab, schwab@xxxxxxxxxxxxxx
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."