From 63b2f907bd9f8ad82b2cfaf8a34497578877253b Mon Sep 17 00:00:00 2001 From: Andrei Warkentin Date: Tue, 28 Mar 2017 02:51:39 -0400 Subject: tcc: fixup clang warnings The O(xxx) stuff in i386-asm.c had me scratching my head. Extracting the macro and trying it out in a separate program doesn't give me any warnings, so I'm confused about what could be going on there. Any cast will make things happy. I used a uint64_t to catch actual cases of overflow, which will still cause a -Wconstant-conversion warning. Signed-off-by: Andrei Warkentin --- arm64-link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arm64-link.c') diff --git a/arm64-link.c b/arm64-link.c index 739d56e..179fb14 100644 --- a/arm64-link.c +++ b/arm64-link.c @@ -153,7 +153,7 @@ ST_FUNC void relocate_plt(TCCState *s1) void relocate_init(Section *sr) {} -void relocate(TCCState *s1, ElfW_Rel *rel, int type, char *ptr, addr_t addr, addr_t val) +void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t addr, addr_t val) { int sym_index = ELFW(R_SYM)(rel->r_info); #ifdef DEBUG_RELOC -- cgit v1.3.1