From a5ce35904f8da15af0b66b7c9e2c4bb8905eb889 Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Sat, 5 Oct 2019 17:25:48 -0700 Subject: [PATCH] Reduce compiler warnings due to format string mismatches. --- cores/nRF5/common_func.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cores/nRF5/common_func.h b/cores/nRF5/common_func.h index fdec3f44..e2947495 100644 --- a/cores/nRF5/common_func.h +++ b/cores/nRF5/common_func.h @@ -171,7 +171,8 @@ const char* dbg_err_str(int32_t err_id); // TODO move to other place #define ADALOG_BUFFER(_tag, _buf, _n) \ do {\ - if ( _tag ) PRINTF("%-6s: len = %d\n", _tag, _n);\ + const char * _xtag = _tag;\ + if ( _xtag ) PRINTF("%-6s: len = %d\n", _xtag, _n);\ dbgDumpMemory(_buf, 1, _n, true);\ }while(0)