]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mkhelp: fix to not generate a line-ending space in some cases
authorViktor Szakats <commit@vsz.me>
Wed, 30 Apr 2025 16:32:02 +0000 (18:32 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 30 Apr 2025 20:14:25 +0000 (22:14 +0200)
Fixing gcc-15:
```
bld/src/tool_hugehelp.c:11739:1: error: trailing whitespace [-Werror=trailing-whitespace=]
```
Ref: https://github.com/curl/curl/actions/runs/14758743743/job/41433794102?pr=17239#step:10:32

Closes #17240

src/mkhelp.pl

index 7219aef992e4e3033ff4ab73620e9d0bb673b6b6..7d9e792ac36cae9b509ce884778ada2a9e3686f1 100755 (executable)
@@ -82,12 +82,14 @@ HEAD
 ;
 
     my $c=0;
-    print " ";
     for(split(//, $gzippedContent)) {
         my $num=ord($_);
+        if(!($c % 12)) {
+            print " ";
+        }
         printf(" 0x%02x,", 0+$num);
         if(!(++$c % 12)) {
-            print "\n ";
+            print "\n";
         }
     }
     print "\n};\n";