logging: Replace __attribute__((unused)) with __unused

Replaced gcc specific with generic.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2020-03-25 07:44:28 +01:00 committed by Anas Nashif
commit 2885da209b

View file

@ -403,17 +403,17 @@ static inline char *log_strdup(const char *str)
LOG_ITEM_DYNAMIC_DATA(GET_ARG1(__VA_ARGS__)); \ LOG_ITEM_DYNAMIC_DATA(GET_ARG1(__VA_ARGS__)); \
\ \
static const struct log_source_const_data * \ static const struct log_source_const_data * \
__log_current_const_data __attribute__((unused)) = \ __log_current_const_data __unused = \
_LOG_LEVEL_RESOLVE(__VA_ARGS__) ? \ _LOG_LEVEL_RESOLVE(__VA_ARGS__) ? \
&LOG_ITEM_CONST_DATA(GET_ARG1(__VA_ARGS__)) : NULL; \ &LOG_ITEM_CONST_DATA(GET_ARG1(__VA_ARGS__)) : NULL; \
\ \
static struct log_source_dynamic_data * \ static struct log_source_dynamic_data * \
__log_current_dynamic_data __attribute__((unused)) = \ __log_current_dynamic_data __unused = \
(_LOG_LEVEL_RESOLVE(__VA_ARGS__) && \ (_LOG_LEVEL_RESOLVE(__VA_ARGS__) && \
IS_ENABLED(CONFIG_LOG_RUNTIME_FILTERING)) ? \ IS_ENABLED(CONFIG_LOG_RUNTIME_FILTERING)) ? \
&LOG_ITEM_DYNAMIC_DATA(GET_ARG1(__VA_ARGS__)) : NULL; \ &LOG_ITEM_DYNAMIC_DATA(GET_ARG1(__VA_ARGS__)) : NULL; \
\ \
static const u32_t __log_level __attribute__((unused)) = \ static const u32_t __log_level __unused = \
_LOG_LEVEL_RESOLVE(__VA_ARGS__) _LOG_LEVEL_RESOLVE(__VA_ARGS__)
/** /**
@ -424,7 +424,7 @@ static inline char *log_strdup(const char *str)
* *
*/ */
#define LOG_LEVEL_SET(level) \ #define LOG_LEVEL_SET(level) \
static const u32_t __log_level __attribute__((unused)) = \ static const u32_t __log_level __unused = \
_LOG_LEVEL_RESOLVE(level) _LOG_LEVEL_RESOLVE(level)
/** /**