misc: Use other size modifiers to fix compiler warnings
control_if.c:521:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat] osmo_bsc_bssap.c:473:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat] mgcp_main.c:162:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformatt]
This commit is contained in:
parent
20fea24515
commit
2f2be578cb
|
@ -518,7 +518,7 @@ static int get_rate_ctr(struct ctrl_cmd *cmd, void *data)
|
|||
|
||||
talloc_free(dup);
|
||||
|
||||
cmd->reply = talloc_asprintf(cmd, "%lu", get_rate_ctr_value(ctr, intv));
|
||||
cmd->reply = talloc_asprintf(cmd, "%"PRIu64, get_rate_ctr_value(ctr, intv));
|
||||
if (!cmd->reply)
|
||||
goto oom;
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ static int dtap_rcvmsg(struct osmo_bsc_sccp_con *conn,
|
|||
|
||||
header = (struct dtap_header *) msg->l3h;
|
||||
if (sizeof(*header) >= length) {
|
||||
LOGP(DMSC, LOGL_ERROR, "The DTAP header does not fit. Wanted: %lu got: %u\n", sizeof(*header), length);
|
||||
LOGP(DMSC, LOGL_ERROR, "The DTAP header does not fit. Wanted: %zu got: %u\n", sizeof(*header), length);
|
||||
LOGP(DMSC, LOGL_ERROR, "hex: %s\n", osmo_hexdump(msg->l3h, length));
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -158,8 +158,8 @@ static int read_call_agent(struct osmo_fd *fd, unsigned int what)
|
|||
perror("Gateway failed to read");
|
||||
return -1;
|
||||
} else if (slen > sizeof(addr)) {
|
||||
fprintf(stderr, "Gateway received message from outerspace: %lu %lu\n",
|
||||
(unsigned long int)slen, sizeof(addr));
|
||||
fprintf(stderr, "Gateway received message from outerspace: %zu %zu\n",
|
||||
slen, sizeof(addr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue