From 0958e88c754e38f51efa14dbd4248c1ea4ad1698 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Mon, 3 Jul 2023 17:04:15 +0100 Subject: [PATCH] checkpatch.pl: remove 'spaces preferred around that...' warning ...because it gives a false positive for "xmlChar *foo" saying it should be "xmlChar * foo". --- scripts/checkpatch.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 45a7b0b0..fcb838d0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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; -- 2.52.0