checkpatch.pl: remove 'spaces preferred around that...' warning

...because it gives a false positive for "xmlChar *foo" saying it should
be "xmlChar * foo".
This commit is contained in:
Johan Malm 2023-07-03 17:04:15 +01:00 committed by Johan Malm
parent 4a31972b6f
commit 0958e88c75

16
scripts/checkpatch.pl vendored
View file

@ -5104,14 +5104,14 @@ sub process {
{
if ($check) {
if (defined $fix_elements[$n + 2] && $ctx !~ /[EW]x[EW]/) {
if (CHK("SPACING",
"spaces preferred around that '$op' $at\n" . $hereptr)) {
$good = rtrim($fix_elements[$n]) . " " . trim($fix_elements[$n + 1]) . " ";
$fix_elements[$n + 2] =~ s/^\s+//;
$line_fixed = 1;
}
} elsif (!defined $fix_elements[$n + 2] && $ctx !~ /Wx[OE]/) {
if (CHK("SPACING",
# if (CHK("SPACING",
# "spaces preferred around that '$op' $at\n" . $hereptr)) {
# $good = rtrim($fix_elements[$n]) . " " . trim($fix_elements[$n + 1]) . " ";
# $fix_elements[$n + 2] =~ s/^\s+//;
# $line_fixed = 1;
# }
} elsif (!defined $fix_elements[$n + 2] && $ctx !~ /Wx[OE]/) {
if (CHK("SPACING",
"space preferred before that '$op' $at\n" . $hereptr)) {
$good = rtrim($fix_elements[$n]) . " " . trim($fix_elements[$n + 1]);
$line_fixed = 1;