Module Name: src Committed By: christos Date: Sat Oct 12 00:49:30 UTC 2019
Modified Files: src/sys/opencrypto: cryptosoft.c cryptosoft_xform.c Log Message: add (void *) intermediate casts to elide gcc function cast warnings. This is the simplest solution; choices: - add pragmas, complex and ugly (need to be gcc-specific) - add -Wno to COPTS. Needs to be done in many makefiles because of rump - add intermediate functions: slows down things To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/opencrypto/cryptosoft.c cvs rdiff -u -r1.27 -r1.28 src/sys/opencrypto/cryptosoft_xform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/opencrypto/cryptosoft.c diff -u src/sys/opencrypto/cryptosoft.c:1.53 src/sys/opencrypto/cryptosoft.c:1.54 --- src/sys/opencrypto/cryptosoft.c:1.53 Thu Jul 11 19:27:24 2019 +++ src/sys/opencrypto/cryptosoft.c Fri Oct 11 20:49:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptosoft.c,v 1.53 2019/07/11 23:27:24 christos Exp $ */ +/* $NetBSD: cryptosoft.c,v 1.54 2019/10/12 00:49:30 christos Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */ @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.53 2019/07/11 23:27:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.54 2019/10/12 00:49:30 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -500,7 +500,7 @@ swcr_authcompute(struct cryptop *crp, st break; case CRYPTO_BUF_MBUF: err = m_apply((struct mbuf *) buf, crd->crd_skip, crd->crd_len, - (int (*)(void*, void *, unsigned int)) axf->Update, + (int (*)(void*, void *, unsigned int))(void *)axf->Update, (void *) &ctx); if (err) return err; @@ -508,7 +508,7 @@ swcr_authcompute(struct cryptop *crp, st case CRYPTO_BUF_IOV: err = cuio_apply((struct uio *) buf, crd->crd_skip, crd->crd_len, - (int (*)(void *, void *, unsigned int)) axf->Update, + (int (*)(void *, void *, unsigned int))(void *)axf->Update, (void *) &ctx); if (err) { return err; Index: src/sys/opencrypto/cryptosoft_xform.c diff -u src/sys/opencrypto/cryptosoft_xform.c:1.27 src/sys/opencrypto/cryptosoft_xform.c:1.28 --- src/sys/opencrypto/cryptosoft_xform.c:1.27 Thu Nov 27 15:30:21 2014 +++ src/sys/opencrypto/cryptosoft_xform.c Fri Oct 11 20:49:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptosoft_xform.c,v 1.27 2014/11/27 20:30:21 christos Exp $ */ +/* $NetBSD: cryptosoft_xform.c,v 1.28 2019/10/12 00:49:30 christos Exp $ */ /* $FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $ */ @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.27 2014/11/27 20:30:21 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.28 2019/10/12 00:49:30 christos Exp $"); #include <crypto/blowfish/blowfish.h> #include <crypto/cast128/cast128.h> @@ -313,26 +313,26 @@ static const struct swcr_auth_hash swcr_ static const struct swcr_auth_hash swcr_auth_hash_hmac_sha2_256 = { &auth_hash_hmac_sha2_256, sizeof(SHA256_CTX), - (void (*)(void *)) SHA256_Init, NULL, NULL, SHA256Update_int, - (void (*)(u_int8_t *, void *)) SHA256_Final + (void (*)(void *))(void *)SHA256_Init, NULL, NULL, SHA256Update_int, + (void (*)(u_int8_t *, void *))(void *)SHA256_Final }; static const struct swcr_auth_hash swcr_auth_hash_hmac_sha2_384 = { &auth_hash_hmac_sha2_384, sizeof(SHA384_CTX), - (void (*)(void *)) SHA384_Init, NULL, NULL, SHA384Update_int, - (void (*)(u_int8_t *, void *)) SHA384_Final + (void (*)(void *))(void *)SHA384_Init, NULL, NULL, SHA384Update_int, + (void (*)(u_int8_t *, void *))(void *)SHA384_Final }; static const struct swcr_auth_hash swcr_auth_hash_hmac_sha2_512 = { &auth_hash_hmac_sha2_512, sizeof(SHA512_CTX), - (void (*)(void *)) SHA512_Init, NULL, NULL, SHA512Update_int, - (void (*)(u_int8_t *, void *)) SHA512_Final + (void (*)(void *))(void *)SHA512_Init, NULL, NULL, SHA512Update_int, + (void (*)(u_int8_t *, void *))(void *)SHA512_Final }; static const struct swcr_auth_hash swcr_auth_hash_aes_xcbc_mac = { &auth_hash_aes_xcbc_mac_96, sizeof(aesxcbc_ctx), null_init, - (void (*)(void *, const u_int8_t *, u_int16_t))aes_xcbc_mac_init, + (void (*)(void *, const u_int8_t *, u_int16_t))(void *)aes_xcbc_mac_init, NULL, aes_xcbc_mac_loop, aes_xcbc_mac_result };