mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
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:
parent
ac79e2e025
commit
cfae62eac0
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue