From 896a5902ecd9f8ffd1ad7cfd75ea646351c79fc1 Mon Sep 17 00:00:00 2001 From: Daniel Boulby Date: Fri, 4 May 2018 14:04:07 +0100 Subject: Fix MISRA Rule 5.3 Part 2 Use a _ prefix for Macro arguments to prevent that argument from hiding variables of the same name in the outer scope Rule 5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope Fixed For: make LOG_LEVEL=50 PLAT=fvp Change-Id: I67b6b05cbad4aeca65ce52981b4679b340604708 Signed-off-by: Daniel Boulby --- common/tf_printf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'common') diff --git a/common/tf_printf.c b/common/tf_printf.c index d4039833..9d8333a6 100644 --- a/common/tf_printf.c +++ b/common/tf_printf.c @@ -15,13 +15,13 @@ * The tf_printf implementation for all BL stages ***********************************************************/ -#define get_num_va_args(args, lcount) \ - (((lcount) > 1) ? va_arg(args, long long int) : \ - ((lcount) ? va_arg(args, long int) : va_arg(args, int))) +#define get_num_va_args(_args, _lcount) \ + (((_lcount) > 1) ? va_arg(_args, long long int) : \ + ((_lcount) ? va_arg(_args, long int) : va_arg(_args, int))) -#define get_unum_va_args(args, lcount) \ - (((lcount) > 1) ? va_arg(args, unsigned long long int) : \ - ((lcount) ? va_arg(args, unsigned long int) : va_arg(args, unsigned int))) +#define get_unum_va_args(_args, _lcount) \ + (((_lcount) > 1) ? va_arg(_args, unsigned long long int) : \ + ((_lcount) ? va_arg(_args, unsigned long int) : va_arg(_args, unsigned int))) void tf_string_print(const char *str) { -- cgit v1.2.3