[Skiboot] [PATCH] hw/xive.c: Fix memcmp() in DEBUG build to compare struct not ptr

Stewart Smith stewart at linux.ibm.com
Tue May 21 13:19:22 AEST 2019


Stewart Smith <stewart at linux.ibm.com> writes:
> With GCC9:
>
> hw/xive.c: In function ‘xive_check_eq_update’:
> hw/xive.c:3034:29: error: argument to ‘sizeof’ in ‘__builtin_memcmp’ call is the same expression as the first source; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
>   if (memcmp(eq, &eq2, sizeof(eq)) != 0) {
>                              ^
> hw/xive.c: In function ‘xive_check_vpc_update’:
> hw/xive.c:3056:29: error: argument to ‘sizeof’ in ‘__builtin_memcmp’ call is the same expression as the first source; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
>   if (memcmp(vp, &vp2, sizeof(vp)) != 0) {
>                              ^
> cc1: all warnings being treated as errors
>
> Fixes: 2eea386767728
> Signed-off-by: Stewart Smith <stewart at linux.ibm.com>

Merged as of 59bdc3a2d199a0d2599732e9ff05f4efb4213c10
-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list