From 21c2a68aa0f73c0d9b24e65b6e342e2dab40b97a Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 4 Dec 2010 16:48:15 +0100 Subject: tccelf/tcccoff: fix some type conversion warnings --- tccelf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tccelf.c') diff --git a/tccelf.c b/tccelf.c index 21a14d5..6f39d23 100644 --- a/tccelf.c +++ b/tccelf.c @@ -506,14 +506,14 @@ static uplong add_got_table(TCCState *s1, uplong val) } #elif defined TCC_TARGET_ARM #define JMP_TABLE_ENTRY_SIZE 8 -static int add_jmp_table(TCCState *s1, int val) +static uplong add_jmp_table(TCCState *s1, int val) { uint32_t *p = (uint32_t *)(s1->runtime_plt_and_got + s1->runtime_plt_and_got_offset); s1->runtime_plt_and_got_offset += JMP_TABLE_ENTRY_SIZE; /* ldr pc, [pc, #-4] */ p[0] = 0xE51FF004; p[1] = val; - return (int)p; + return (uplong)p; } #endif #endif @@ -666,8 +666,8 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) *(int*)ptr ^= 0xE12FFF10 ^ 0xE1A0F000; /* BX Rm -> MOV PC, Rm */ break; default: - fprintf(stderr,"FIXME: handle reloc type %x at %lx [%.8x] to %lx\n", - type,addr,(unsigned int)(long)ptr,val); + fprintf(stderr,"FIXME: handle reloc type %x at %x [%.8x] to %x\n", + type, (unsigned)addr, (unsigned)(uplong)ptr, (unsigned)val); break; #elif defined(TCC_TARGET_C67) case R_C60_32: @@ -692,8 +692,8 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) case R_C60HI16: break; default: - fprintf(stderr,"FIXME: handle reloc type %x at %lx [%.8x] to %lx\n", - type,addr,(unsigned int)(long)ptr, val); + fprintf(stderr,"FIXME: handle reloc type %x at %x [%.8x] to %x\n", + type, (unsigned)addr, (unsigned)(uplong)ptr, (unsigned)val); break; #elif defined(TCC_TARGET_X86_64) case R_X86_64_64: -- cgit v1.3.1