]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler warnings
authorMark Andrews <marka@isc.org>
Tue, 10 Jun 2014 02:38:32 +0000 (12:38 +1000)
committerMark Andrews <marka@isc.org>
Tue, 10 Jun 2014 02:38:32 +0000 (12:38 +1000)
lib/isc/chacha_private.h
lib/isc/random.c

index d79329dbbcb4aa5d78ee9cbdb4c94b85f7044558..a6653c6a42ec1780555024d3609922fe967f1bea 100644 (file)
@@ -51,8 +51,10 @@ typedef struct
   a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
   c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
 
-static const char sigma[16] = "expand 32-byte k";
-static const char tau[16] = "expand 16-byte k";
+static const char sigma[16] = { 'e', 'x', 'p', 'a', 'n', 'd', ' ', '3',
+                               '2', '-', 'b', 'y', 't', 'e', ' ', 'k' };
+static const char tau[16] = { 'e', 'x', 'p', 'a', 'n', 'd', ' ', '1',
+                             '6', '-', 'b', 'y', 't', 'e', ' ', 'k' };
 
 static void
 chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits,u32 ivbits)
index dc9893fff7903f7f864ddaa9dd68e6ad7b2f7831..06640eec7eeb9cf3343c872b938e90d0b83134af 100644 (file)
@@ -64,8 +64,8 @@
 #define KEYSTREAM_ONLY
 #include "chacha_private.h"
 
-#define CHACHA_KEYSIZE 32
-#define CHACHA_IVSIZE 8
+#define CHACHA_KEYSIZE 32U
+#define CHACHA_IVSIZE 8U
 #define CHACHA_BLOCKSIZE 64
 #define CHACHA_BUFFERSIZE (16 * CHACHA_BLOCKSIZE)