From: Bernd Edlinger Date: Mon, 7 May 2018 14:10:02 +0000 (+0200) Subject: Fix --strict-warnings build of ppc-linux target X-Git-Tag: OpenSSL_1_1_1-pre7~86 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=8c8fbca92dc95bb8672dea194bbe414059a874d2;ds=inline Fix --strict-warnings build of ppc-linux target Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6191) --- diff --git a/crypto/ppccap.c b/crypto/ppccap.c index 2f7cd8e6e7..48c6b83651 100644 --- a/crypto/ppccap.c +++ b/crypto/ppccap.c @@ -28,6 +28,9 @@ #endif #include #include +#include +#include +#include "bn/bn_lcl.h" #include "ppc_arch.h" @@ -64,6 +67,7 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, void sha256_block_p8(void *ctx, const void *inp, size_t len); void sha256_block_ppc(void *ctx, const void *inp, size_t len); +void sha256_block_data_order(void *ctx, const void *inp, size_t len); void sha256_block_data_order(void *ctx, const void *inp, size_t len) { OPENSSL_ppccap_P & PPC_CRYPTO207 ? sha256_block_p8(ctx, inp, len) : @@ -72,6 +76,7 @@ void sha256_block_data_order(void *ctx, const void *inp, size_t len) void sha512_block_p8(void *ctx, const void *inp, size_t len); void sha512_block_ppc(void *ctx, const void *inp, size_t len); +void sha512_block_data_order(void *ctx, const void *inp, size_t len); void sha512_block_data_order(void *ctx, const void *inp, size_t len) { OPENSSL_ppccap_P & PPC_CRYPTO207 ? sha512_block_p8(ctx, inp, len) : @@ -106,16 +111,17 @@ void poly1305_blocks_fpu(void *ctx, const unsigned char *inp, size_t len, unsigned int padbit); void poly1305_emit_fpu(void *ctx, unsigned char mac[16], const unsigned int nonce[4]); +int poly1305_init(void *ctx, const unsigned char key[16], void *func[2]); int poly1305_init(void *ctx, const unsigned char key[16], void *func[2]) { if (sizeof(size_t) == 4 && (OPENSSL_ppccap_P & PPC_FPU)) { poly1305_init_fpu(ctx, key); - func[0] = poly1305_blocks_fpu; - func[1] = poly1305_emit_fpu; + func[0] = (void*)(uintptr_t)poly1305_blocks_fpu; + func[1] = (void*)(uintptr_t)poly1305_emit_fpu; } else { poly1305_init_int(ctx, key); - func[0] = poly1305_blocks; - func[1] = poly1305_emit; + func[0] = (void*)(uintptr_t)poly1305_blocks; + func[1] = (void*)(uintptr_t)poly1305_emit; } return 1; }