Skip to content

Commit 56f25b4

Browse files
author
Tomasz Bursztyka
committed
tests: net: Fix format issues
Fixes: error: format '%u' expects argument of type 'unsigned int' Change-Id: I02aaaea79150967d7831d89d0c05427bf2685708 Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent eb2d16b commit 56f25b4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/net/6lo/src/main.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,29 +237,29 @@ static bool compare_data(struct net_buf *buf, struct net_6lo_data *data)
237237
if (net_buf_frags_len(buf->frags) !=
238238
(NET_IPV6UDPH_LEN + remaining)) {
239239

240-
TC_PRINT("mismatch lengths, expected %d received %d\n",
241-
NET_IPV6UDPH_LEN + remaining,
242-
net_buf_frags_len(buf->frags));
240+
TC_PRINT("mismatch lengths, expected %d received %zu\n",
241+
NET_IPV6UDPH_LEN + remaining,
242+
net_buf_frags_len(buf->frags));
243243

244244
return false;
245245
}
246246
} else if (data->nh_icmp) {
247247
if (net_buf_frags_len(buf->frags) !=
248248
(NET_IPV6ICMPH_LEN + remaining)) {
249249

250-
TC_PRINT("mismatch lengths, expected %d received %d\n",
251-
NET_IPV6ICMPH_LEN + remaining,
252-
net_buf_frags_len(buf->frags));
250+
TC_PRINT("mismatch lengths, expected %d received %zu\n",
251+
NET_IPV6ICMPH_LEN + remaining,
252+
net_buf_frags_len(buf->frags));
253253

254254
return false;
255255
}
256256
} else {
257257
if (net_buf_frags_len(buf->frags) !=
258258
(NET_IPV6H_LEN + remaining)) {
259259

260-
TC_PRINT("mismatch lengths, expected %d received %d\n",
261-
NET_IPV6H_LEN + remaining,
262-
net_buf_frags_len(buf->frags));
260+
TC_PRINT("mismatch lengths, expected %d received %zu\n",
261+
NET_IPV6H_LEN + remaining,
262+
net_buf_frags_len(buf->frags));
263263

264264
return false;
265265
}
@@ -818,7 +818,7 @@ static int test_6lo(struct net_6lo_data *data)
818818
}
819819

820820
#if DEBUG > 0
821-
TC_PRINT("length before compression %d\n",
821+
TC_PRINT("length before compression %zu\n",
822822
net_buf_frags_len(buf->frags));
823823
net_hexdump_frags("before-compression", buf);
824824
#endif
@@ -829,7 +829,7 @@ static int test_6lo(struct net_6lo_data *data)
829829
}
830830

831831
#if DEBUG > 0
832-
TC_PRINT("length after compression %d\n",
832+
TC_PRINT("length after compression %zu\n",
833833
net_buf_frags_len(buf->frags));
834834
net_hexdump_frags("after-compression", buf);
835835
#endif
@@ -840,7 +840,7 @@ static int test_6lo(struct net_6lo_data *data)
840840
}
841841

842842
#if DEBUG > 0
843-
TC_PRINT("length after uncompression %d\n",
843+
TC_PRINT("length after uncompression %zu\n",
844844
net_buf_frags_len(buf->frags));
845845
net_hexdump_frags("after-uncompression", buf);
846846
#endif

tests/net/ieee802154/l2/src/ieee802154_fake_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static inline void insert_frag_dummy_way(struct net_buf *buf)
8787

8888
static int fake_tx(struct device *dev, struct net_buf *buf)
8989
{
90-
TC_PRINT("Sending buffer %p - length %u\n",
90+
TC_PRINT("Sending buffer %p - length %zu\n",
9191
buf, net_buf_frags_len(buf));
9292

9393
net_nbuf_set_ll_reserve(current_buf, net_nbuf_ll_reserve(buf));

0 commit comments

Comments
 (0)