fix some warning

This commit is contained in:
grischka
2009-07-18 22:07:51 +02:00
parent c998985c74
commit f88350b611
2 changed files with 6 additions and 6 deletions

View File

@ -109,7 +109,7 @@ static void asm_expr_unary(TCCState *s1, ExprValue *pe)
} }
if (sym->r == SHN_ABS) { if (sym->r == SHN_ABS) {
/* if absolute symbol, no need to put a symbol value */ /* if absolute symbol, no need to put a symbol value */
pe->v = (long)sym->next; pe->v = sym->jnext;
pe->sym = NULL; pe->sym = NULL;
} else { } else {
pe->v = 0; pe->v = 0;
@ -225,7 +225,7 @@ static inline void asm_expr_sum(TCCState *s1, ExprValue *pe)
/* OK */ /* OK */
} else if (pe->sym->r == e2.sym->r && pe->sym->r != 0) { } else if (pe->sym->r == e2.sym->r && pe->sym->r != 0) {
/* we also accept defined symbols in the same section */ /* we also accept defined symbols in the same section */
pe->v += (long)pe->sym->next - (long)e2.sym->next; pe->v += pe->sym->jnext - e2.sym->jnext;
} else { } else {
goto cannot_relocate; goto cannot_relocate;
} }
@ -277,7 +277,7 @@ static void asm_new_label1(TCCState *s1, int label, int is_local,
sym->type.t = VT_STATIC | VT_VOID; sym->type.t = VT_STATIC | VT_VOID;
} }
sym->r = sh_num; sym->r = sh_num;
sym->next = (void *)value; sym->jnext = value;
} }
static void asm_new_label(TCCState *s1, int label, int is_local) static void asm_new_label(TCCState *s1, int label, int is_local)
@ -298,7 +298,7 @@ static void asm_free_labels(TCCState *st)
sec = SECTION_ABS; sec = SECTION_ABS;
else else
sec = st->sections[s->r]; sec = st->sections[s->r];
put_extern_sym2(s, sec, (long)s->next, 0, 0); put_extern_sym2(s, sec, s->jnext, 0, 0);
} }
/* remove label */ /* remove label */
table_ident[s->v - TOK_IDENT]->sym_label = NULL; table_ident[s->v - TOK_IDENT]->sym_label = NULL;

View File

@ -632,7 +632,7 @@ static void relocate_section(TCCState *s1, Section *s)
break; break;
default: default:
fprintf(stderr,"FIXME: handle reloc type %x at %lx [%.8x] to %lx\n", fprintf(stderr,"FIXME: handle reloc type %x at %lx [%.8x] to %lx\n",
type,addr,(unsigned int )ptr,val); type,addr,(unsigned int)(long)ptr,val);
break; break;
#elif defined(TCC_TARGET_C67) #elif defined(TCC_TARGET_C67)
case R_C60_32: case R_C60_32:
@ -658,7 +658,7 @@ static void relocate_section(TCCState *s1, Section *s)
break; break;
default: default:
fprintf(stderr,"FIXME: handle reloc type %x at %lx [%.8x] to %lx\n", fprintf(stderr,"FIXME: handle reloc type %x at %lx [%.8x] to %lx\n",
type,addr,(unsigned int )ptr,val); type,addr,(unsigned int)(long)ptr, val);
break; break;
#elif defined(TCC_TARGET_X86_64) #elif defined(TCC_TARGET_X86_64)
case R_X86_64_64: case R_X86_64_64: