[fuzzer] Mark alloc_state as unused

It is really unused when failing-alloc isn't on.
This commit is contained in:
Ebrahim Byagowi 2020-08-12 02:19:06 +04:30 committed by ebraminio
parent 2af58c3518
commit 0417938011
1 changed files with 7 additions and 1 deletions

View File

@ -3,10 +3,16 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
#if defined(__GNUC__) && (__GNUC__ >= 4) || (__clang__)
#define HB_UNUSED __attribute__((unused))
#else
#define HB_UNUSED
#endif
#ifdef HB_IS_IN_FUZZER
/* See src/failing-alloc.c */
extern "C" int alloc_state;
#else
/* Just a dummy global variable */
static int alloc_state = 0;
static int HB_UNUSED alloc_state = 0;
#endif