diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2025-12-10 10:57:45 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2025-12-10 10:57:45 +0000 |
| commit | cfae62eac076d43bc94c667084018a21ee8a305f (patch) | |
| tree | b8f9a51f1fdb6fcb3a90bebdda99b746e88efaa0 | |
| parent | ac79e2e025e03b7038e3abc886e34a03f5ec2934 (diff) | |
libcasper: fix warnings when _ALIGN preserves types
Without the void * casts, the compiler complains about an alignment
requirement increase.
Reviewed by: kib, markj
Obtained from: CheriBSD
Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D53946
| -rw-r--r-- | lib/libcasper/services/cap_grp/cap_grp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcasper/services/cap_grp/cap_grp.c b/lib/libcasper/services/cap_grp/cap_grp.c index 025ce00adf56..5c613292555e 100644 --- a/lib/libcasper/services/cap_grp/cap_grp.c +++ b/lib/libcasper/services/cap_grp/cap_grp.c @@ -102,7 +102,7 @@ group_unpack_members(const nvlist_t *nvl, char ***fieldp, char **bufferp, datasize = _ALIGNBYTES + sizeof(char *); if (datasize >= *bufsizep) return (ERANGE); - outstrs = (char **)_ALIGN(*bufferp); + outstrs = (char **)(void *)_ALIGN(*bufferp); outstrs[0] = NULL; *fieldp = outstrs; *bufferp += datasize; @@ -124,7 +124,7 @@ group_unpack_members(const nvlist_t *nvl, char ***fieldp, char **bufferp, if (datasize >= *bufsizep) return (ERANGE); - outstrs = (char **)_ALIGN(*bufferp); + outstrs = (char **)(void *)_ALIGN(*bufferp); str = (char *)outstrs + sizeof(char *) * (nmem + 1); for (ii = 0; ii < nmem; ii++) { n = snprintf(nvlname, sizeof(nvlname), "gr_mem[%u]", ii); |
