Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw/xive.c: Fix memcmp() in DEBUG build to compare struct not ptr
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: 2eea386 Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
- Loading branch information