[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libjit] Compiler warning in jit_function_apply_vararg
From: |
Eli Zaretskii |
Subject: |
[Libjit] Compiler warning in jit_function_apply_vararg |
Date: |
Wed, 15 Aug 2018 18:16:33 +0300 |
Compiling jit-function.c produces the following warning:
libtool: compile: gcc -static-libgcc -DHAVE_CONFIG_H -I. -I..
-I../include -I../include -I. -I. -fno-gcse -g -O2 -Wall
-fno-omit-frame-pointer -MT jit-function.lo -MD -MP -MF .deps/jit-function.Tpo
-c jit-function.c -DDLL_EXPORT -DPIC -o .libs/jit-function.o
jit-function.c: In function 'jit_function_apply_vararg':
jit-function.c:903:8: warning: variable 'entry' set but not used
[-Wunused-but-set-variable]
void *entry;
^~~~~
Looking at the code, I see that it computes 'entry', but then uses
func->entry_point:
if(func->is_compiled)
{
entry = func->entry_point;
}
else
{
entry = (*func->context->on_demand_driver)(func);
}
[...]
/* Apply the function. If it returns, then there is no exception */
jit_apply(signature, func->entry_point, args,
jit_type_num_params(func->signature), return_area);
Should the call to jit_apply use 'entry' instead?
Thanks.
- [Libjit] Compiler warning in jit_function_apply_vararg,
Eli Zaretskii <=