Skip to content

Commit ff29d30

Browse files
galakcarlescufi
authored andcommitted
net: tcp2: Fix compile failure on native_posix_64
Need to use %zd in formatter string for net_pkt_get_len since it returns a size_t otherwise we get something like: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Werror=format=] Signed-off-by: Kumar Gala <[email protected]>
1 parent d585cdd commit ff29d30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/ip/tcp2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static int tcp_pkt_linearize(struct net_pkt *pkt, size_t pos, size_t len)
4242
size_t len1, len2;
4343

4444
if (net_pkt_get_len(pkt) < (pos + len)) {
45-
NET_ERR("Insufficient packet len=%d (pos+len=%zu)",
45+
NET_ERR("Insufficient packet len=%zd (pos+len=%zu)",
4646
net_pkt_get_len(pkt), pos + len);
4747
ret = -EINVAL;
4848
goto out;

0 commit comments

Comments
 (0)