diff --git a/include/logging/log_core.h b/include/logging/log_core.h index 7dd4e331032..202638fc283 100644 --- a/include/logging/log_core.h +++ b/include/logging/log_core.h @@ -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); \ } \ } \