Build errors with gcc-12
gcc-12.0.1
E.g.:
isds.c: In function 'build_send_check_dbdummy_request.part.0.constprop.0':
isds.c:6101:5: error: pointer 'request_37' used after 'free' [-Werror=use-after-free]
6101 | xmlFreeNode(request);
| ^~~~~~~~~~~~~~~~~~~~
isds.c:6100:5: note: call to 'free' here
6100 | free(service_name_locale);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
and:
In file included from isds_PersonName_duplicate.c:1:
isds_PersonName_duplicate.c: In function 'test_isds_PersonName_duplicate':
../test.h:39:30: error: storing the address of local variable 'copy' in 'test_destructor_argument' [-Werror=dangling-pointer=]
39 | test_destructor_argument = argument; \
isds_PersonName_duplicate.c:6:29: note: 'copy' declared here
6 | struct isds_PersonName *copy = isds_PersonName_duplicate(origin);
| ^~~~
../test.h:21:14: note: 'test_destructor_argument' declared here
21 | extern void *test_destructor_argument;
| ^~~~~~~~~~~~~~~~~~~~~~~~
../test.h:39:30: error: storing the address of local variable 'copy' in 'test_destructor_argument' [-Werror=dangling-pointer=]
39 | test_destructor_argument = argument; \
isds_PersonName_duplicate.c:6:29: note: 'copy' declared here
6 | struct isds_PersonName *copy = isds_PersonName_duplicate(origin);
| ^~~~
../test.h:21:14: note: 'test_destructor_argument' declared here
21 | extern void *test_destructor_argument;
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
It has to be build with the --disable-fatalwarnings
.