Wed, 27 Dec 2023 17:28:33 +0100
ignore the intentional use-after-free
tests/util_allocator.c | file | annotate | diff | comparison | revisions |
1.1 --- a/tests/util_allocator.c Wed Dec 27 17:19:54 2023 +0100 1.2 +++ b/tests/util_allocator.c Wed Dec 27 17:28:33 2023 +0100 1.3 @@ -83,9 +83,12 @@ 1.4 data->alloc_failed++; 1.5 } else { 1.6 data->free_total++; 1.7 +#pragma GCC diagnostic push 1.8 +#pragma GCC diagnostic ignored "-Wuse-after-free" 1.9 if (!cx_testing_allocator_untrack(data, mem)) { 1.10 data->free_failed++; 1.11 } 1.12 +#pragma GCC diagnostic pop 1.13 cx_testing_allocator_track(data, ptr); 1.14 } 1.15 return ptr;