mirror of
https://github.com/frida/tinycc
synced 2024-11-27 18:19:35 +03:00
arm-unused-warnings: remove problems with defined but unused wariables
arm-gen.c: In function `gfunc_call': arm-gen.c:1202: warning: unused variable `variadic' arm-gen.c: In function `gfunc_prolog': arm-gen.c:1258: warning: unused variable `avregs' arm-gen.c:1340: warning: label `from_stack' defined but not used arm-gen.c:222: warning: 'default_elfinterp' defined but not used
This commit is contained in:
parent
6cbf4fb740
commit
774f0611cc
13
arm-gen.c
13
arm-gen.c
@ -217,7 +217,7 @@ static int regmask(int r) {
|
||||
|
||||
/******************************************************/
|
||||
|
||||
#ifdef TCC_ARM_EABI
|
||||
#if defined(TCC_ARM_EABI) && !defined(CONFIG_TCC_ELFINTERP)
|
||||
char *default_elfinterp(struct TCCState *s)
|
||||
{
|
||||
if (s->float_abi == ARM_HARD_FLOAT)
|
||||
@ -1199,11 +1199,13 @@ static int copy_params(int nb_args, struct plan *plan, int todo)
|
||||
void gfunc_call(int nb_args)
|
||||
{
|
||||
int r, args_size;
|
||||
int variadic, def_float_abi = float_abi;
|
||||
int def_float_abi = float_abi;
|
||||
int todo;
|
||||
struct plan plan;
|
||||
|
||||
#ifdef TCC_ARM_EABI
|
||||
int variadic;
|
||||
|
||||
if (float_abi == ARM_HARD_FLOAT) {
|
||||
variadic = (vtop[-nb_args].type.ref->c == FUNC_ELLIPSIS);
|
||||
if (variadic || floats_in_core_regs(&vtop[-nb_args]))
|
||||
@ -1255,9 +1257,12 @@ void gfunc_prolog(CType *func_type)
|
||||
Sym *sym,*sym2;
|
||||
int n, nf, size, align, struct_ret = 0;
|
||||
int addr, pn, sn; /* pn=core, sn=stack */
|
||||
struct avail_regs avregs = AVAIL_REGS_INITIALIZER;
|
||||
CType ret_type;
|
||||
|
||||
#ifdef TCC_ARM_EABI
|
||||
struct avail_regs avregs = AVAIL_REGS_INITIALIZER;
|
||||
#endif
|
||||
|
||||
sym = func_type->ref;
|
||||
func_vt = sym->type;
|
||||
func_var = (func_type->ref->c == FUNC_ELLIPSIS);
|
||||
@ -1337,8 +1342,8 @@ void gfunc_prolog(CType *func_type)
|
||||
if (!sn && pn > 4)
|
||||
sn = (pn - 4);
|
||||
} else {
|
||||
from_stack:
|
||||
#ifdef TCC_ARM_EABI
|
||||
from_stack:
|
||||
sn = (sn + (align-1)/4) & -(align/4);
|
||||
#endif
|
||||
addr = (n + nf + sn) * 4;
|
||||
|
2
tcc.h
2
tcc.h
@ -1372,7 +1372,7 @@ ST_FUNC void gen_opl(int op);
|
||||
|
||||
/* ------------ arm-gen.c ------------ */
|
||||
#ifdef TCC_TARGET_ARM
|
||||
#ifdef TCC_ARM_EABI
|
||||
#if defined(TCC_ARM_EABI) && !defined(CONFIG_TCC_ELFINTERP)
|
||||
ST_FUNC char *default_elfinterp(struct TCCState *s);
|
||||
#endif
|
||||
ST_FUNC void arm_init(struct TCCState *s);
|
||||
|
Loading…
Reference in New Issue
Block a user