[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 10/34] xen/crypto: rijndael: Fix compilation with Clang 3.5



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 <julien.grall@xxxxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.