Fix some format strings for enums, they are signed
This commit is contained in:
parent
213c305a2f
commit
8facc3498e
|
@ -323,7 +323,7 @@ static int journal_file_verify_header(JournalFile *f) {
|
|||
} else if (state == STATE_ARCHIVED)
|
||||
return -ESHUTDOWN;
|
||||
else if (state != STATE_OFFLINE) {
|
||||
log_debug("Journal file %s has unknown state %u.", f->path, state);
|
||||
log_debug("Journal file %s has unknown state %i.", f->path, state);
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
|
@ -2417,7 +2417,7 @@ void journal_file_dump(JournalFile *f) {
|
|||
break;
|
||||
|
||||
default:
|
||||
printf("Type: unknown (%u)\n", o->object.type);
|
||||
printf("Type: unknown (%i)\n", o->object.type);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1268,7 +1268,7 @@ int bus_add_match_internal_kernel(
|
|||
if (c->type - BUS_MATCH_ARG < 3)
|
||||
name_change_arg[c->type - BUS_MATCH_ARG] = c->value_str;
|
||||
|
||||
snprintf(buf, sizeof(buf), "arg%u", c->type - BUS_MATCH_ARG);
|
||||
snprintf(buf, sizeof(buf), "arg%i", c->type - BUS_MATCH_ARG);
|
||||
bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, buf, c->value_str);
|
||||
using_bloom = true;
|
||||
break;
|
||||
|
@ -1277,7 +1277,7 @@ int bus_add_match_internal_kernel(
|
|||
case BUS_MATCH_ARG_PATH...BUS_MATCH_ARG_PATH_LAST: {
|
||||
char buf[sizeof("arg")-1 + 2 + sizeof("-slash-prefix")];
|
||||
|
||||
snprintf(buf, sizeof(buf), "arg%u-slash-prefix", c->type - BUS_MATCH_ARG_PATH);
|
||||
snprintf(buf, sizeof(buf), "arg%i-slash-prefix", c->type - BUS_MATCH_ARG_PATH);
|
||||
bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, buf, c->value_str);
|
||||
using_bloom = true;
|
||||
break;
|
||||
|
@ -1286,7 +1286,7 @@ int bus_add_match_internal_kernel(
|
|||
case BUS_MATCH_ARG_NAMESPACE...BUS_MATCH_ARG_NAMESPACE_LAST: {
|
||||
char buf[sizeof("arg")-1 + 2 + sizeof("-dot-prefix")];
|
||||
|
||||
snprintf(buf, sizeof(buf), "arg%u-dot-prefix", c->type - BUS_MATCH_ARG_NAMESPACE);
|
||||
snprintf(buf, sizeof(buf), "arg%i-dot-prefix", c->type - BUS_MATCH_ARG_NAMESPACE);
|
||||
bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, buf, c->value_str);
|
||||
using_bloom = true;
|
||||
break;
|
||||
|
|
|
@ -1476,7 +1476,7 @@ int socket_read_message(sd_rtnl *rtnl) {
|
|||
r = type_system_get_type(NULL, &nl_type, new_msg->nlmsg_type);
|
||||
if (r < 0) {
|
||||
if (r == -ENOTSUP)
|
||||
log_debug("sd-rtnl: ignored message with unknown type: %u",
|
||||
log_debug("sd-rtnl: ignored message with unknown type: %i",
|
||||
new_msg->nlmsg_type);
|
||||
|
||||
continue;
|
||||
|
|
|
@ -380,7 +380,7 @@ static inline uint32_t random_u32(void) {
|
|||
if (!s) \
|
||||
return log_oom(); \
|
||||
} else { \
|
||||
r = asprintf(&s, "%u", i); \
|
||||
r = asprintf(&s, "%i", i); \
|
||||
if (r < 0) \
|
||||
return log_oom(); \
|
||||
} \
|
||||
|
|
Loading…
Reference in a new issue