Fix some static analysis issues

This commit is contained in:
Justine Tunney 2024-07-27 09:16:54 -07:00
parent fb54604b31
commit f147d3dde9
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
30 changed files with 375 additions and 266 deletions

View file

@ -29,6 +29,10 @@
#define TINYMALLOC_MAX_ALIGN sizeof(max_align_t)
#endif
#pragma GCC push_options
#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
#pragma GCC diagnostic ignored "-Wanalyzer-use-after-free"
static struct {
alignas(max_align_t) char bits[TINYMALLOC_MAX_BYTES];
char *memory;
@ -178,3 +182,5 @@ OutOfMemory:
errno = ENOMEM;
return 0;
}
#pragma GCC pop_options