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
This commit is contained in:
Brooks Davis 2025-12-10 10:57:45 +00:00
parent ac79e2e025
commit cfae62eac0

View file

@ -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);