From 4511a5c3d8f140e2c32dd32e04668555b25f43bf Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 4 Feb 2016 00:31:20 +0000 Subject: arisc: make debug macros -pedantic compatible Allwinner removed "-pedantic" from the list of CFLAGS to get away with some conditional debug macros using a GNU extension. Fix those macros to use a standard compliant syntax and re-enable -pedantic. --- Makefile | 2 +- plat/sun50iw1p1/scp/include/arisc_dbgs.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 8177820..85d651f 100644 --- a/Makefile +++ b/Makefile @@ -227,7 +227,7 @@ ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \ -Werror -Wmissing-include-dirs \ -mgeneral-regs-only -D__ASSEMBLY__ \ ${DEFINES} ${INCLUDES} -CFLAGS += -nostdinc -ffreestanding -Wall \ +CFLAGS += -nostdinc -pedantic -ffreestanding -Wall \ -Werror -Wmissing-include-dirs \ -mgeneral-regs-only -std=c99 -c -Os \ ${DEFINES} ${INCLUDES} diff --git a/plat/sun50iw1p1/scp/include/arisc_dbgs.h b/plat/sun50iw1p1/scp/include/arisc_dbgs.h index aef8f5e..79ca603 100644 --- a/plat/sun50iw1p1/scp/include/arisc_dbgs.h +++ b/plat/sun50iw1p1/scp/include/arisc_dbgs.h @@ -37,21 +37,21 @@ #define DEBUG_LEVEL_WRN ((uint32_t)1 << 2) #define DEBUG_LEVEL_ERR ((uint32_t)1 << 3) -#define ARISC_INF(format, args...) \ +#define ARISC_INF(...) \ if(DEBUG_LEVEL_INF & (0xf0 >> (arisc_debug_level +1))) \ - tf_printf("[SCP] :"format, ##args); + tf_printf("[SCP] :" __VA_ARGS__); -#define ARISC_LOG(format, args...) \ +#define ARISC_LOG(...) \ if(DEBUG_LEVEL_LOG & (0xf0 >> (arisc_debug_level +1))) \ - tf_printf("[SCP] :"format, ##args); + tf_printf("[SCP] :" __VA_ARGS__); -#define ARISC_WRN(format, args...) \ +#define ARISC_WRN(...) \ if(DEBUG_LEVEL_WRN & (0xf0 >> (arisc_debug_level +1))) \ - tf_printf("[SCP WARING] :"format, ##args); + tf_printf("[SCP WARING] :" __VA_ARGS__); -#define ARISC_ERR(format, args...) \ +#define ARISC_ERR(...) \ if(DEBUG_LEVEL_ERR & (0xf0 >> (arisc_debug_level +1))) \ - tf_printf("[SCP ERROR] :"format, ##args); + tf_printf("[SCP ERROR] :" __VA_ARGS__); #else /* ARISC_DEBUG_ON */ #define ARISC_INF(...) -- cgit v1.2.3