From 42f04664b39f0ed92af1651ba38686e3bb3a0804 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Thu, 21 Sep 2017 09:24:59 +0200 Subject: [PATCH] Fix last variable length array warning All gone now. Fixed #37 --- tests/test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test.c b/tests/test.c index 276a867..4da42db 100644 --- a/tests/test.c +++ b/tests/test.c @@ -500,13 +500,13 @@ static int p_sha512() // yield an invalid signature). static int p_eddsa() { +#define MESSAGE_SIZE 32 int status = 0; - static const size_t message_size = 32; - u8 message[message_size]; p_random(message, 32); + u8 message[MESSAGE_SIZE]; p_random(message, 32); FOR (i, 0, 1000) { u8 public_key[32]; p_random(public_key, 32); u8 signature [64]; p_random(signature , 64); - status |= ~crypto_check(signature, public_key, message, message_size); + status |= ~crypto_check(signature, public_key, message, MESSAGE_SIZE); } printf("%s: EdDSA\n", status != 0 ? "FAILED" : "OK"); return status; -- 2.47.3