Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/opencrypto add (void *) intermediate casts to elide gcc ...
details: https://anonhg.NetBSD.org/src/rev/d99e6913a9a9
branches: trunk
changeset: 1004079:d99e6913a9a9
user: christos <christos%NetBSD.org@localhost>
date: Sat Oct 12 00:49:30 2019 +0000
description:
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
diffstat:
sys/opencrypto/cryptosoft.c | 8 ++++----
sys/opencrypto/cryptosoft_xform.c | 18 +++++++++---------
2 files changed, 13 insertions(+), 13 deletions(-)
diffs (88 lines):
diff -r 520a7b6d1bf1 -r d99e6913a9a9 sys/opencrypto/cryptosoft.c
--- a/sys/opencrypto/cryptosoft.c Fri Oct 11 23:04:52 2019 +0000
+++ b/sys/opencrypto/cryptosoft.c Sat Oct 12 00:49:30 2019 +0000
@@ -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 @@
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 @@
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;
diff -r 520a7b6d1bf1 -r d99e6913a9a9 sys/opencrypto/cryptosoft_xform.c
--- a/sys/opencrypto/cryptosoft_xform.c Fri Oct 11 23:04:52 2019 +0000
+++ b/sys/opencrypto/cryptosoft_xform.c Sat Oct 12 00:49:30 2019 +0000
@@ -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_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
};
Home |
Main Index |
Thread Index |
Old Index