mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Revert "hotfix for logger: use '%i' instead of '%zu'"
This reverts commit e6aa03520993201c618de32197ab3ee92d4b0738. Root cause was fixe in Nuttx and backported
This commit is contained in:
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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user