From: Juergen Christ Date: Thu, 20 May 2021 11:27:43 +0000 (+0200) Subject: Fix warning in gf_serialize X-Git-Tag: openssl-3.0.0-beta1~404 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7217decc7c454eec4a6d4ce163ac44b4558fe03b;p=thirdparty%2Fopenssl.git Fix warning in gf_serialize Compiling under -Werror fails in gf_serialize: crypto/ec/curve448/f_generic.c:21:27: error: argument 1 of type 'uint8_t[56]' {aka 'unsigned char[56]'} with mismatched bound [-Werror=array-parameter=] 21 | void gf_serialize(uint8_t serial[SER_BYTES], const gf x, int with_hibit) | ~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from crypto/ec/curve448/f_generic.c:12: crypto/ec/curve448/field.h:65:28: note: previously declared as 'uint8_t *' {aka 'unsigned char *'} void gf_serialize(uint8_t *serial, const gf x, int with_highbit); ~~~~~~~~~^~~~~~ Changed parameter to pointer to fix this warning. Signed-off-by: Juergen Christ Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15376) --- diff --git a/crypto/ec/curve448/f_generic.c b/crypto/ec/curve448/f_generic.c index 7e63998a219..3f4d7c7a9ef 100644 --- a/crypto/ec/curve448/f_generic.c +++ b/crypto/ec/curve448/f_generic.c @@ -18,7 +18,7 @@ static const gf MODULUS = { }; /* Serialize to wire format. */ -void gf_serialize(uint8_t serial[SER_BYTES], const gf x, int with_hibit) +void gf_serialize(uint8_t *serial, const gf x, int with_hibit) { unsigned int j = 0, fill = 0; dword_t buffer = 0;