2018-07-17 16:59:41

by Valdis Klētnieks

[permalink] [raw]
Subject: PATCH scripts/kernel-doc

Fix a warning whinge from Perl introduced by "scripts: kernel-doc: parse next structs/unions"

Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/({ <-- HERE [^\{\}]*})/ at ./scripts/kernel-doc line 1155.
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/({ <-- HERE )/ at ./scripts/kernel-doc line 1179.

Signed-off-by: Valdis Kletnieks <[email protected]>
---
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 0057d8eafcc1..31a34ced55a3 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1152,7 +1152,7 @@ sub dump_struct($$) {
}

# Ignore other nested elements, like enums
- $members =~ s/({[^\{\}]*})//g;
+ $members =~ s/(\{[^\{\}]*})//g;

create_parameterlist($members, ';', $file, $declaration_name);
check_sections($file, $declaration_name, $decl_type, $sectcheck, $struct_actual);
@@ -1176,7 +1176,7 @@ sub dump_struct($$) {
$declaration .= "\t" x $level;
}
$declaration .= "\t" . $clause . "\n";
- $level++ if ($clause =~ m/({)/ && !($clause =~m/}/));
+ $level++ if ($clause =~ m/(\{)/ && !($clause =~m/}/));
}
output_declaration($declaration_name,
'struct',



2018-07-17 22:23:50

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: PATCH scripts/kernel-doc

Em Tue, 17 Jul 2018 12:57:29 -0400
[email protected] escreveu:

> Fix a warning whinge from Perl introduced by "scripts: kernel-doc: parse next structs/unions"
>
> Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/({ <-- HERE [^\{\}]*})/ at ./scripts/kernel-doc line 1155.
> Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/({ <-- HERE )/ at ./scripts/kernel-doc line 1179.
>
> Signed-off-by: Valdis Kletnieks <[email protected]>


Reviewed-by: Mauro Carvalho Chehab <[email protected]>


> ---
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 0057d8eafcc1..31a34ced55a3 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -1152,7 +1152,7 @@ sub dump_struct($$) {
> }
>
> # Ignore other nested elements, like enums
> - $members =~ s/({[^\{\}]*})//g;
> + $members =~ s/(\{[^\{\}]*})//g;
>
> create_parameterlist($members, ';', $file, $declaration_name);
> check_sections($file, $declaration_name, $decl_type, $sectcheck, $struct_actual);
> @@ -1176,7 +1176,7 @@ sub dump_struct($$) {
> $declaration .= "\t" x $level;
> }
> $declaration .= "\t" . $clause . "\n";
> - $level++ if ($clause =~ m/({)/ && !($clause =~m/}/));
> + $level++ if ($clause =~ m/(\{)/ && !($clause =~m/}/));
> }
> output_declaration($declaration_name,
> 'struct',
>




Cheers,
Mauro

2018-07-23 15:33:17

by Jonathan Corbet

[permalink] [raw]
Subject: Re: PATCH scripts/kernel-doc

On Tue, 17 Jul 2018 12:57:29 -0400
[email protected] wrote:

> Fix a warning whinge from Perl introduced by "scripts: kernel-doc: parse next structs/unions"
>
> Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/({ <-- HERE [^\{\}]*})/ at ./scripts/kernel-doc line 1155.
> Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/({ <-- HERE )/ at ./scripts/kernel-doc line 1179.

Applied, thanks.

jon