]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
lzma: Fix compilation error under clang 10
authorDaniel Axtens <dja@axtens.net>
Mon, 20 Jul 2020 07:07:49 +0000 (17:07 +1000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 30 Oct 2020 20:53:00 +0000 (21:53 +0100)
Compiling under clang 10 gives:

grub-core/lib/LzmaEnc.c:1362:9: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
        {
        ^
grub-core/lib/LzmaEnc.c:1358:7: note: previous statement is here
      if (repIndex == 0)
      ^
1 error generated.

It's not really that unclear in context: there's a commented-out
if-statement. But tweak the alignment anyway so that clang is happy.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/lib/LzmaEnc.c

index 753e56a95e34013e15133a9f2be05588979fc7b7..52b3315586858e397853f75fec9c649a53f79d28 100644 (file)
@@ -1359,7 +1359,7 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
         startLen = lenTest + 1;
 
       /* if (_maxMode) */
-        {
+      {
           UInt32 lenTest2 = lenTest + 1;
           UInt32 limit = lenTest2 + p->numFastBytes;
           UInt32 nextRepMatchPrice;
@@ -1403,7 +1403,7 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
               }
             }
           }
-        }
+      }
     }
     }
     /* for (UInt32 lenTest = 2; lenTest <= newLen; lenTest++) */