From d6f17b492f8373bc0c002da901a30918623ab2d4 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Mon, 1 Oct 2012 20:58:19 +0000 Subject: [PATCH] - Moved definition to top to prevent MS VC compiler warning --- library/blowfish.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/library/blowfish.c b/library/blowfish.c index 5c17e3e64..f55d0852f 100644 --- a/library/blowfish.c +++ b/library/blowfish.c @@ -58,8 +58,15 @@ } #endif +static const uint32_t P[BLOWFISH_ROUNDS + 2] = { + 0x243F6A88L, 0x85A308D3L, 0x13198A2EL, 0x03707344L, + 0xA4093822L, 0x299F31D0L, 0x082EFA98L, 0xEC4E6C89L, + 0x452821E6L, 0x38D01377L, 0xBE5466CFL, 0x34E90C6CL, + 0xC0AC29B7L, 0xC97C50DDL, 0x3F84D5B5L, 0xB5470917L, + 0x9216D5D9L, 0x8979FB1BL +}; + /* declarations of data at the end of this file */ -static const uint32_t P[]; static const uint32_t S[4][256]; static uint32_t F(blowfish_context *ctx, uint32_t x) @@ -360,14 +367,6 @@ int blowfish_crypt_ctr( blowfish_context *ctx, } #endif /* POLARSSL_CIPHER_MODE_CTR */ -static const uint32_t P[BLOWFISH_ROUNDS + 2] = { - 0x243F6A88L, 0x85A308D3L, 0x13198A2EL, 0x03707344L, - 0xA4093822L, 0x299F31D0L, 0x082EFA98L, 0xEC4E6C89L, - 0x452821E6L, 0x38D01377L, 0xBE5466CFL, 0x34E90C6CL, - 0xC0AC29B7L, 0xC97C50DDL, 0x3F84D5B5L, 0xB5470917L, - 0x9216D5D9L, 0x8979FB1BL -}; - static const uint32_t S[4][256] = { { 0xD1310BA6L, 0x98DFB5ACL, 0x2FFD72DBL, 0xD01ADFB7L, 0xB8E1AFEDL, 0x6A267E96L, 0xBA7C9045L, 0xF12C7F99L,