logging: Added explicit casts of buffer in hexdump delegates

Since the various delegates have different data types for their
parameters, this makes the call into this macro a little simpler
(alleviating the need for each call to know how it'll be handed off
down the chain).

Signed-off-by: Erik Johnson <erik.johnson@nimbelink.com>
This commit is contained in:
Erik Johnson 2020-01-22 14:03:41 -06:00 committed by Anas Nashif
commit fe83035474

View file

@ -308,7 +308,8 @@ static inline char z_log_minimal_level_to_char(int level)
if (Z_LOG_CONST_LEVEL_CHECK(_level)) { \
if (IS_ENABLED(CONFIG_LOG_MINIMAL)) { \
Z_LOG_TO_PRINTK(_level, "%s", _str); \
log_minimal_hexdump_print(_level, _data, \
log_minimal_hexdump_print(_level, \
(const char *)_data, \
_length); \
} else if (is_user_context || \
(_level <= LOG_RUNTIME_FILTER(_filter))) { \
@ -320,12 +321,15 @@ static inline char z_log_minimal_level_to_char(int level)
\
if (is_user_context) { \
log_hexdump_from_user(src_level, _str, \
_data, _length); \
(const char *)_data, \
_length); \
} else if (IS_ENABLED(CONFIG_LOG_IMMEDIATE)) { \
log_hexdump_sync(src_level, _str, \
_data, _length); \
(const char *)_data, \
_length); \
} else { \
log_hexdump(_str, _data, _length, \
log_hexdump(_str, (const char *)_data, \
_length, \
src_level); \
} \
} \