Re: [PATCH] scripts/kernel-doc: fix make htmldoc warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 29, 2023 at 12:06:58PM -0600, Jonathan Corbet wrote:
> Swarup Laxman Kotiaklapudi <swarupkotikalapudi@xxxxxxxxx> writes:
> 
> > make htmldocs has below warnings:
> >
> > ..
> > Variable length lookbehind is experimental in regex;
> > marked by <-- HERE in m/(?<=^|\s)-Werror(?=$|\s)
> > <-- HERE / at ./scripts/kernel-doc line 188.
> > ...
> 
> So how do you get this warning?  I've not seen it.  Which version of
> Perl? 

Hi Jon, I can get this warning with perl v5.34.0, but not with perl
v5.36.0.

I checked the git history of perl, variable length lookbehind is mostly
no longer considered experimental by the commit below that was included
in v5.36.0.

commit c15a34bfb4f54341de8e463d45b5bcbaad235350
Author: Yves Orton <demerphq@xxxxxxxxx>
Date:   Wed Feb 23 07:06:22 2022 +0100

    regcomp.c: Reduce scope of experimental warnings with lookbehind


Sorry for accidentally introducing this issue on old version of perl.
The fix patch has been sent at [1]

[1] https://lore.kernel.org/all/20231030085404.3343403-1-yujie.liu@xxxxxxxxx/

Best Regards,
Yujie

> > "-Werror" option in make command,
> > needs "-Werror" to have space before
> > and after while running make command,
> > hence space checking is sepratly done,
> > and is not part of lookbehind regular expression.
> >
> > Below command also didn't
> > show any error:
> >  make KCFLAGS="-Werror=return-type" W=1 kernel/fork.o
> >
> > Fixes: 91f950e8b9d8 ("scripts/kernel-doc: match -Werror flag strictly")
> > Signed-off-by: Swarup Laxman Kotiaklapudi <swarupkotikalapudi@xxxxxxxxx>
> > ---
> >  scripts/kernel-doc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> > index d660e1f4b483..aa9e3e198d12 100755
> > --- a/scripts/kernel-doc
> > +++ b/scripts/kernel-doc
> > @@ -185,7 +185,7 @@ if (defined($ENV{'KBUILD_VERBOSE'}) && $ENV{'KBUILD_VERBOSE'} =~ '1') {
> >  if (defined($ENV{'KCFLAGS'})) {
> >  	my $kcflags = "$ENV{'KCFLAGS'}";
> >  
> > -	if ($kcflags =~ /(?<=^|\s)-Werror(?=$|\s)/) {
> > +	if ($kcflags =~ /(?<=^|)(\s)-Werror(?=$|)(\s)/) {
> >  		$Werror = 1;
> >  	}
> >  }
> 
> Thanks,
> 
> jon




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux