]> git.mdlowis.com Git - proto/labwc.git/commitdiff
checkpatch.pl: remove 'spaces preferred around that...' warning
authorJohan Malm <jgm323@gmail.com>
Mon, 3 Jul 2023 16:04:15 +0000 (17:04 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 4 Jul 2023 05:01:47 +0000 (06:01 +0100)
...because it gives a false positive for "xmlChar *foo" saying it should
be "xmlChar * foo".

scripts/checkpatch.pl

index 45a7b0b04862110819c54eadddfe746ef3642272..fcb838d016005bcf910ed15746cb5cc9478a5f0f 100755 (executable)
@@ -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;