From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [PATCH 10/34] xen/crypto: rijndael: Fix compilation with Clang 3.5 Date: Tue, 25 Mar 2014 16:55:17 +0000 Message-ID: <1395766541-23979-11-git-send-email-julien.grall@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUe2-0008La-Pf for xen-devel@lists.xenproject.org; Tue, 25 Mar 2014 16:56:10 +0000 Received: by mail-ee0-f51.google.com with SMTP id c13so684360eek.38 for ; Tue, 25 Mar 2014 09:56:09 -0700 (PDT) In-Reply-To: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com, Keir Fraser , Julien Grall , tim@xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Td0, Td1, Td2, Td3, Td4 are only used when NEED_RIJNDAEL is defined. rijndael.c:383:18: error: unused variable 'Td0' [-Werror,-Wunused-const-variable] static const u32 Td0[256] = { ^ rijndael.c:449:18: error: unused variable 'Td1' [-Werror,-Wunused-const-variable] static const u32 Td1[256] = { ^ rijndael.c:515:18: error: unused variable 'Td2' [-Werror,-Wunused-const-variable] static const u32 Td2[256] = { ^ rijndael.c:581:18: error: unused variable 'Td3' [-Werror,-Wunused-const-variable] static const u32 Td3[256] = { ^ rijndael.c:647:18: error: unused variable 'Td4' [-Werror,-Wunused-const-variable] static const u32 Td4[256] = { Signed-off-by: Julien Grall Cc: Keir Fraser --- xen/crypto/rijndael.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/crypto/rijndael.c b/xen/crypto/rijndael.c index b7cd0d1..9de0992 100644 --- a/xen/crypto/rijndael.c +++ b/xen/crypto/rijndael.c @@ -380,6 +380,8 @@ static const u32 Te4[256] = { 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, }; + +#ifdef NEED_RIJNDAEL_DECRYPT static const u32 Td0[256] = { 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, @@ -710,6 +712,7 @@ static const u32 Td4[256] = { 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, }; +#endif static const u32 rcon[] = { 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, -- 1.7.10.4