git: 9c4f7e82348b - main - ipfilter: Cast uintmax_t values to size_t when adding to a pointer.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 28 Sep 2022 21:06:40 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=9c4f7e82348b656aef9660f859b76d6e894590aa
commit 9c4f7e82348b656aef9660f859b76d6e894590aa
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-09-28 20:58:34 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-09-28 20:58:34 +0000
ipfilter: Cast uintmax_t values to size_t when adding to a pointer.
GCC warns about the mismatched sizes on 32-bit platforms where
uintmax_t is larger in size than a pointer.
Reviewed by: imp, cy
Differential Revision: https://reviews.freebsd.org/D36753
---
sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c
index 091d2c7d2061..aa55ef2d8aec 100644
--- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c
+++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c
@@ -383,7 +383,7 @@ sysctl_ipf_int_nat ( SYSCTL_HANDLER_ARGS )
ipf_nat_softc_t *nat_softc;
nat_softc = V_ipfmain.ipf_nat_soft;
- arg1 = (void *)((uintptr_t)nat_softc + arg2);
+ arg1 = (void *)((uintptr_t)nat_softc + (size_t)arg2);
return (sysctl_ipf_int(oidp, arg1, 0, req));
}
@@ -397,7 +397,7 @@ sysctl_ipf_int_state ( SYSCTL_HANDLER_ARGS )
ipf_state_softc_t *state_softc;
state_softc = V_ipfmain.ipf_state_soft;
- arg1 = (void *)((uintptr_t)state_softc + arg2);
+ arg1 = (void *)((uintptr_t)state_softc + (size_t)arg2);
return (sysctl_ipf_int(oidp, arg1, 0, req));
}
@@ -411,7 +411,7 @@ sysctl_ipf_int_auth ( SYSCTL_HANDLER_ARGS )
ipf_auth_softc_t *auth_softc;
auth_softc = V_ipfmain.ipf_auth_soft;
- arg1 = (void *)((uintptr_t)auth_softc + arg2);
+ arg1 = (void *)((uintptr_t)auth_softc + (size_t)arg2);
return (sysctl_ipf_int(oidp, arg1, 0, req));
}
@@ -425,7 +425,7 @@ sysctl_ipf_int_frag ( SYSCTL_HANDLER_ARGS )
ipf_frag_softc_t *frag_softc;
frag_softc = V_ipfmain.ipf_frag_soft;
- arg1 = (void *)((uintptr_t)frag_softc + arg2);
+ arg1 = (void *)((uintptr_t)frag_softc + (size_t)arg2);
return (sysctl_ipf_int(oidp, arg1, 0, req));
}