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 --- tcc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index 5b9d4a3..41ad1ab 100644 --- a/tcc.h +++ b/tcc.h @@ -721,7 +721,8 @@ struct TCCState { enum { LINE_MACRO_OUTPUT_FORMAT_GCC, LINE_MACRO_OUTPUT_FORMAT_NONE, - LINE_MACRO_OUTPUT_FORMAT_STD + LINE_MACRO_OUTPUT_FORMAT_STD, + LINE_MACRO_OUTPUT_FORMAT_P10 = 11 } Pflag; /* -P switch */ char dflag; /* -dX value */ @@ -1446,7 +1447,7 @@ ST_FUNC int code_reloc (int reloc_type); ST_FUNC int gotplt_entry_type (int reloc_type); ST_FUNC unsigned create_plt_entry(TCCState *s1, unsigned got_offset, struct sym_attr *attr); ST_FUNC void relocate_init(Section *sr); -ST_FUNC void relocate(TCCState *s1, ElfW_Rel *rel, int type, char *ptr, addr_t addr, addr_t val); +ST_FUNC void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t addr, addr_t val); ST_FUNC void relocate_plt(TCCState *s1); /* ------------ xxx-gen.c ------------ */ -- cgit v1.3.1