size_t is different in posix build

This commit is contained in:
Mark Whitehorn 2016-04-30 10:16:16 -06:00 committed by Lorenz Meier
parent fb4d72df86
commit e5e523aa9e
1 changed files with 1 additions and 1 deletions

View File

@ -718,7 +718,7 @@ void Logger::write_info(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[%d] %s", vlen, name);
msg->key_len = snprintf(msg->key, sizeof(msg->key), "char[%u] %s", (unsigned)vlen, name);
size_t msg_size = sizeof(*msg) - sizeof(msg->key) + msg->key_len;
/* copy string value directly to buffer */