public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/kernel-doc: fix make htmldoc warning
@ 2023-10-28 18:22 Swarup Laxman Kotiaklapudi
  2023-10-29 18:06 ` Jonathan Corbet
  0 siblings, 1 reply; 5+ messages in thread
From: Swarup Laxman Kotiaklapudi @ 2023-10-28 18:22 UTC (permalink / raw)
  To: corbet, yujie.liu, linux-doc, swarupkotikalapudi,
	linux-kernel-mentees

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.
...

"-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@gmail.com>
---
 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;
 	}
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-30  9:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-28 18:22 [PATCH] scripts/kernel-doc: fix make htmldoc warning Swarup Laxman Kotiaklapudi
2023-10-29 18:06 ` Jonathan Corbet
2023-10-30  0:02   ` Akira Yokosawa
2023-10-30  5:37     ` Yujie Liu
2023-10-30  9:18   ` Yujie Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox