Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jxPu7-0005fs-1b for mharc-grub-devel@gnu.org; Mon, 20 Jul 2020 03:08:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jxPu4-0005fJ-OL for grub-devel@gnu.org; Mon, 20 Jul 2020 03:08:00 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:37016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jxPu2-0000FR-Ri for grub-devel@gnu.org; Mon, 20 Jul 2020 03:08:00 -0400 Received: by mail-pg1-x544.google.com with SMTP id d4so9869899pgk.4 for ; Mon, 20 Jul 2020 00:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zYxv6JkqcxY3qruKa4+XCLUzMMJPI5MOF2uZIqBZqok=; b=cTXvZwlXxHJrGkQ/ImrA2ZStUfZzB3ybMXDnbZp0OtAEJma9jkleTPaqfPZHxBnf7y t1G68hZriol2c7fVTsFPrPXp2sW8LD3g3pc9qF1c9o1e+chIEdtpO8oFwgShTsEZvgSI /Su2UowRn7BRZ0UjfGAogloMa+sT2L4EoKgnw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zYxv6JkqcxY3qruKa4+XCLUzMMJPI5MOF2uZIqBZqok=; b=U2a8QU/6Oz5CtN5gwCZoDLn1IztfanV2ohaRda9ZY0a78SIKr0NU/HB7UcMDtYuYpo HWZ7vdM6S/amiHmr5iCouG4Ce1FG2KskbpKSkNQLVQhMiVzc9KkDn1MfaByeqZLBtOEs VydsAw6C6WjyGnhDVjMj1p90hNiNz7CWVZkC3FpmLhUam5FU1+lA4PZijh5zGN4IZ7ve RWBpGSY36PDKu652mJN/PL2V3+B7Rr3inHM4xSUsGlcaebJOA7+HxCjvLBv3xne2shnp Ga31Pd8LJTZ7obzVpRIMlNq62Ti+J+J8g+ghRVyMLYunURwNgdBoY+1MQwuaChpF7xXk CULg== X-Gm-Message-State: AOAM5313UHulZhbs+ZvSvP2Vcem13gUrmN6ysygD/sijf3auNUgS0FOF E/l0GO4l4vEy+sHltYHfB/5S9oJe/cw= X-Google-Smtp-Source: ABdhPJwHCf3QrVNjX+aFEKso8PgfRgJE36khU1lICFzlk1o4FHRuWV5AJtdHQnxhgYFMmzcEhAnp5Q== X-Received: by 2002:a62:fcca:: with SMTP id e193mr18826699pfh.307.1595228876012; Mon, 20 Jul 2020 00:07:56 -0700 (PDT) Received: from localhost (2001-44b8-111e-5c00-84f0-2fba-cae3-98e1.static.ipv6.internode.on.net. [2001:44b8:111e:5c00:84f0:2fba:cae3:98e1]) by smtp.gmail.com with ESMTPSA id u26sm15891019pfn.54.2020.07.20.00.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 00:07:55 -0700 (PDT) From: Daniel Axtens To: grub-devel@gnu.org Cc: Daniel Axtens Subject: [PATCH] lzma: fix compilation error under clang-10 Date: Mon, 20 Jul 2020 17:07:49 +1000 Message-Id: <20200720070749.1871045-1-dja@axtens.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=dja@axtens.net; helo=mail-pg1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 07:08:01 -0000 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 --- With this and Patrick's patch 'json: Remove invalid typedef redefinition', grub-emu compiles under clang-10. --- grub-core/lib/LzmaEnc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/lib/LzmaEnc.c b/grub-core/lib/LzmaEnc.c index f2ec04a8c281..edd92b772d34 100644 --- a/grub-core/lib/LzmaEnc.c +++ b/grub-core/lib/LzmaEnc.c @@ -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++) */ -- 2.25.1