No news from maintainers, so I ping again.

Beside the warning, what happens with prepare_dynamic_rel in case of
ARM/ARM64 processor?

It fails to default case which does nothing so this entire function is just
as return 0;

If it's Ok, sym_index = ELFW(R_SYM)(rel->r_info); should move to the two
cases that use it.

 

From: Christian Jullien [mailto:eli...@orange.fr] 
Sent: lundi 30 avril 2018 07:28
To: tinycc-devel@nongnu.org
Subject: New ARM warning. Does it reveal an issue?

 

Hi all,

 

Recompiling mod on ARM gives me this new Warning :

tccelf.c:869:9: warning: variable 'sym_index' set but not used
[-Wunused-but-set-variable]

     int sym_index, type, count;

         ^~~~~~~~~

 

On:

 

/* count the number of dynamic relocations so that we can reserve

   their space */

static int prepare_dynamic_rel(TCCState *s1, Section *sr)

{

    ElfW_Rel *rel;

    int sym_index, type, count;

 

    count = 0;

    for_each_elem(sr, 0, rel, ElfW_Rel) {

        sym_index = ELFW(R_SYM)(rel->r_info);

 

Indeed, code that follows is  for TCC_TARGET_I386 or TCC_TARGET_X86_64

 

Nothing related to ARM or ARM64.

 

Is it annoying, can you please at least fix this warning?

 

Christian

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to