Build warnings with gcc 10
Building with gcc 10 hits two problems:
/usr/bin/cc -DNOT_DYNAMORIO_CORE -I. -I/home/bruening/dr/git/src/libutil -I/home/bruening/dr/git/src/core -I/home/bruening/dr/git/src/core/lib -m64 -fno-strict-aliasing -fno-stack-protector -fvisibility=internal -std=gnu99 -g3 -fno-omit-frame-pointer -fno-builtin-strcmp -Wall -Werror -Wwrite-strings -Wno-unused-but-set-variable -Wno-stringop-truncation -Wno-format-truncation -Wno-stringop-overflow -DRC_IS_drconfig -DDRCONFIG -MD -MT tools/CMakeFiles/drconfig.dir/drdeploy.c.o -MF tools/CMakeFiles/drconfig.dir/drdeploy.c.o.d -o tools/CMakeFiles/drconfig.dir/drdeploy.c.o -c /home/bruening/dr/git/src/tools/drdeploy.c
In file included from /home/bruening/dr/git/src/tools/drdeploy.c:67:
/home/bruening/dr/git/src/tools/drdeploy.c: In function ‘append_client’:
/home/bruening/dr/git/src/libutil/dr_frontend.h:108:23: error: ‘snprintf’ argument 4 may overlap destination object ‘client_paths’ [-Werror=restrict]
108 | # define _snprintf snprintf
/home/bruening/dr/git/src/tools/drdeploy.c:751:9: note: in expansion of macro ‘_snprintf’
751 | _snprintf(client_paths[index], BUFFER_SIZE_ELEMENTS(client_paths[index]), "%s",
| ^~~~~~~~~
/home/bruening/dr/git/src/tools/drdeploy.c:737:20: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
737 | char client_paths[MAX_CLIENT_LIBS][MAXIMUM_PATH],
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
FAILED: suite/tests/CMakeFiles/client.alloc-noreset.dll.dir/client-interface/alloc.dll.c.o
/usr/bin/cc -Dclient_alloc_noreset_dll_EXPORTS -I. -I/home/bruening/dr/git/src/suite/tests -I/home/bruening/dr/git/src/core/arch -Icmake/../include -I/home/bruening/dr/git/src/core/drlibc -I/home/bruening/dr/git/src/core/lib -Iinclude/annotations -Isuite/tests/annotations -Iext/include -m64 -fPIC -DX86_64 -DLINUX -DDR_HOST_X86 -DDR_HOST_X64 -DDR_REG_ENUM_COMPATIBILITY -DUSE_VISIBILITY_ATTRIBUTES -m64 -fno-strict-aliasing -fno-stack-protector -fvisibility=internal -std=gnu99 -g3 -fno-omit-frame-pointer -fno-builtin-strcmp -Werror -Wwrite-strings -Wno-unused-but-set-variable -Wno-stringop-truncation -Wno-format-truncation -Wno-stringop-overflow -fno-stack-protector -m64 -MD -MT suite/tests/CMakeFiles/client.alloc-noreset.dll.dir/client-interface/alloc.dll.c.o -MF suite/tests/CMakeFiles/client.alloc-noreset.dll.dir/client-interface/alloc.dll.c.o.d -o suite/tests/CMakeFiles/client.alloc-noreset.dll.dir/client-interface/alloc.dll.c.o -c /home/bruening/dr/git/src/suite/tests/client-interface/alloc.dll.c
/home/bruening/dr/git/src/suite/tests/client-interface/alloc.dll.c: In function ‘inline_alloc_test’:
/home/bruening/dr/git/src/suite/tests/client-interface/alloc.dll.c:634:9: error: ignoring return value of ‘malloc’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
634 | malloc(100000000);
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors