mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
Revert "hotfix for logger: use '%i' instead of '%zu'"
This reverts commit e6aa035209.
Root cause was fixe in Nuttx and backported
This commit is contained in:
committed by
Julian Oes
parent
df0599913e
commit
e296297ab7
@@ -2011,7 +2011,7 @@ void Logger::write_info(LogType type, const char *name, const char *value)
|
||||
|
||||
/* construct format key (type and name) */
|
||||
size_t vlen = strlen(value);
|
||||
msg.key_len = snprintf(msg.key, sizeof(msg.key), "char[%i] %s", (int)vlen, name);
|
||||
msg.key_len = snprintf(msg.key, sizeof(msg.key), "char[%zu] %s", vlen, name);
|
||||
size_t msg_size = sizeof(msg) - sizeof(msg.key) + msg.key_len;
|
||||
|
||||
/* copy string value directly to buffer */
|
||||
@@ -2037,7 +2037,7 @@ void Logger::write_info_multiple(LogType type, const char *name, const char *val
|
||||
|
||||
/* construct format key (type and name) */
|
||||
size_t vlen = strlen(value);
|
||||
msg.key_len = snprintf(msg.key, sizeof(msg.key), "char[%i] %s", (int)vlen, name);
|
||||
msg.key_len = snprintf(msg.key, sizeof(msg.key), "char[%zu] %s", vlen, name);
|
||||
size_t msg_size = sizeof(msg) - sizeof(msg.key) + msg.key_len;
|
||||
|
||||
/* copy string value directly to buffer */
|
||||
|
||||
Reference in New Issue
Block a user