From 66d992d883dd27a890ab3fc4e4de6659eaaaae1a Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Mon, 16 May 2011 14:54:22 +0200 Subject: [PATCH] Remove unused variables Declare float type conditionally to not declare them conditionally when they are not used. --- arm-gen.c | 4 ++++ libtcc.c | 1 + 2 files changed, 5 insertions(+) diff --git a/arm-gen.c b/arm-gen.c index 81ee221..9e176a5 100644 --- a/arm-gen.c +++ b/arm-gen.c @@ -23,8 +23,10 @@ #ifdef TARGET_DEFS_ONLY #ifdef TCC_ARM_EABI +#ifndef TCC_ARM_VFP // Avoid useless warning #define TCC_ARM_VFP #endif +#endif /* number of available registers */ #ifdef TCC_ARM_VFP @@ -100,8 +102,10 @@ enum { //#define FUNC_STRUCT_PARAM_AS_PTR #if defined(TCC_ARM_EABI) && defined(TCC_ARM_VFP) +#ifdef NEED_FLOAT_TYPES static CType float_type, double_type, func_float_type, func_double_type; #define func_ldouble_type func_double_type +#endif #else #define func_float_type func_old_type #define func_double_type func_old_type diff --git a/libtcc.c b/libtcc.c index 5dc7be9..f97336e 100644 --- a/libtcc.c +++ b/libtcc.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define NEED_FLOAT_TYPES #include "tcc.h" /********************************************************/