fix instrumentation for -Werror,-Wunused-but-set-variable

`used` is so it isn't optimized out. `unused` is to avoid the warning.
This commit is contained in:
Jesse Schwartzentruber 2022-04-20 15:39:28 -04:00
parent 630eb943a5
commit f53e6a6cf2

View File

@ -1035,7 +1035,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
cc_params[cc_par_cnt++] =
"-D__AFL_LOOP(_A)="
"({ static volatile char *_B __attribute__((used)); "
"({ static volatile char *_B __attribute__((used,unused)); "
" _B = (char*)\"" PERSIST_SIG
"\"; "
#ifdef __APPLE__
@ -1049,7 +1049,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
cc_params[cc_par_cnt++] =
"-D__AFL_INIT()="
"do { static volatile char *_A __attribute__((used)); "
"do { static volatile char *_A __attribute__((used,unused)); "
" _A = (char*)\"" DEFER_SIG
"\"; "
#ifdef __APPLE__