packet: Offset plus length is not always uint32_t, but it's always size_t
According to gcc, PRIu32 matches the type of the argument we're printing here on both 64 and 32-bits architectures. According to Clang, though, that's not the case, as the result of the sum is an unsigned long on 64-bit. Use the z modifier, given that we're summing uint32_t to size_t, and the result is at most promoted to size_t. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
06559048e7
commit
7e175f32c1
1 changed files with 1 additions and 1 deletions
2
packet.c
2
packet.c
|
@ -106,7 +106,7 @@ void *packet_get_do(const struct pool *p, size_t idx, size_t offset,
|
|||
|
||||
if (p->pkt[idx].offset + len + offset > p->buf_size) {
|
||||
if (func) {
|
||||
trace("packet offset plus length %lu from size %zu, "
|
||||
trace("packet offset plus length %zu from size %zu, "
|
||||
"%s:%i", p->pkt[idx].offset + len + offset,
|
||||
p->buf_size, func, line);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue