Skip to content

Commit

Permalink
Add noinline to internal malloc
Browse files Browse the repository at this point in the history
This suppresses the false positive Warray-bounds warnings in GCC.
  • Loading branch information
tidwall committed Nov 20, 2024
1 parent 6311379 commit 53c43fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bgen.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ BGEN_EXTERN int BGEN_API(seek_at_desc_mut)(BGEN_NODE **root, size_t index,

// IMPLEMENTATION

BGEN_NOINLINE
static void *BGEN_SYM(malloc)(size_t size, void *udata) {
(void)size, (void)udata;
BGEN_MALLOC
Expand Down

0 comments on commit 53c43fb

Please sign in to comment.