build fails with -Werror=sizeof-pointer-memaccess
Created by: tjaalton
testing the build without the out-of-tree build from the previous issue, it fails later with:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -D_FORTIFY_SOURCE=2 -I../util/uthash/src -I.
./util -I../util/trace -I../util/glvnd_pthread -I../GLdispatch -I../../include -I../x11glvnd -p
thread -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wal
l -Werror -std=gnu99 -include config.h -fvisibility=hidden -DUSE_X86_64_ASM -c libglxmapping.c
-fPIC -DPIC -o .libs/libGLX_la-libglxmapping.o
In file included from ../../include/lkdhash.h:6:0,
from libglxmapping.c:45:
libglxmapping.c: In function 'RemoveScreenPointerMapping':
libglxmapping.c:566:66: error: argument to 'sizeof' in 'memcmp' call is the same expression as
the second source; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
HASH_FIND(hh, _LH(__glXScreenPointerMappingHash), ptr, sizeof(ptr), pEntry);
^
../util/uthash/src/uthash.h:594:41: note: in definition of macro 'HASH_KEYCMP'
#define HASH_KEYCMP(a,b,len) memcmp(a,b,len)
^
../util/uthash/src/uthash.h:101:8: note: in expansion of macro 'HASH_FIND_IN_BKT'
HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ],
^
libglxmapping.c:566:5: note: in expansion of macro 'HASH_FIND'
HASH_FIND(hh, _LH(__glXScreenPointerMappingHash), ptr, sizeof(ptr), pEntry);
^
cc1: all warnings being treated as errors