From c4cde48b67b02a0b9fcf0d3a3d67d66fca29ae87 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 30 Mar 2006 10:26:44 +0000 Subject: [PATCH] Avoid compile warnings for tinycc. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5801 --- perf/Makefile.am | 2 ++ perf/tinycc.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/perf/Makefile.am b/perf/Makefile.am index 83e9bfdcd0..24f07699fc 100644 --- a/perf/Makefile.am +++ b/perf/Makefile.am @@ -26,3 +26,5 @@ AM_CXXFLAGS = $(AM_CFLAGS) fbench_CFLAGS = $(AM_FLAG_M3264_PRI) -g -O2 fbench_LDADD = ffbench_LDADD = -lm + +tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow diff --git a/perf/tinycc.c b/perf/tinycc.c index 14ae48e602..2e5c051b36 100644 --- a/perf/tinycc.c +++ b/perf/tinycc.c @@ -9145,7 +9145,7 @@ void parse_number(const char *p) break; /* return next token without macro substitution */ -static inline void next_nomacro1(void) +static /*inline*/ void next_nomacro1(void) { int t, c, is_long; TokenSym *ts; @@ -9833,7 +9833,7 @@ static int macro_subst_tok(TokenString *tok_str, /* handle the '##' operator. Return NULL if no '##' seen. Otherwise return the resulting string (which must be freed). */ -static inline int *macro_twosharps(const int *macro_str) +static /*inline*/ int *macro_twosharps(const int *macro_str) { TokenSym *ts; const int *macro_ptr1, *start_macro_ptr, *ptr, *saved_macro_ptr; @@ -11144,6 +11144,12 @@ void gen_opif(int op) } } +/* return the pointed type of t */ +static inline CType *pointed_type(CType *type) +{ + return &type->ref->type; +} + static int pointed_size(CType *type) { int align; @@ -11620,12 +11626,6 @@ static int type_size(CType *type, int *a) } } -/* return the pointed type of t */ -static inline CType *pointed_type(CType *type) -{ - return &type->ref->type; -} - /* modify type so that its it is a pointer to type. */ static void mk_pointer(CType *type) { @@ -20585,7 +20585,7 @@ static int rt_get_caller_pc(unsigned long *paddr, ucontext_t *uc, int level) { unsigned long fp; - int i; + //int i; if (level == 0) { *paddr = 12345; //uc->uc_mcontext.gregs[REG_EIP]; -- 2.47.2