From: Loup Vaillant Date: Thu, 21 Sep 2017 07:24:59 +0000 (+0200) Subject: Fix last variable length array warning X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=42f04664b39f0ed92af1651ba38686e3bb3a0804;p=Monocypher.git Fix last variable length array warning All gone now. Fixed #37 --- 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;