From a60185cc4079a68fa6687752ec3a85ef2602bbd4 Mon Sep 17 00:00:00 2001 From: liqinhui Date: Tue, 19 Dec 2023 16:55:22 +0800 Subject: [PATCH] net:Fix the warnings. tcp/tcp_send_buffered.c: In function 'psock_send_eventhandler': tcp/tcp_send_buffered.c:1025:17: warning: format '%u' expects argument of type 'unsigned int', but argument 9 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 1025 | ninfo("SEND: wrb=%p seq=%" PRIu32 " pktlen=%u sent=%u sndlen=%zu " | ^~~~~~~~~~~~~~~~~~~~ ...... 1030 | conn->snd_wnd, seq, remaining_snd_wnd); | ~~~~~~~~~~~~~ | | | uint32_t {aka long unsigned int} wireless/ieee80211/bcm43xxx/bcmf_netdev.c: In function 'bcmf_addmac': wireless/ieee80211/bcm43xxx/bcmf_netdev.c:879:26: warning: unused variable 'priv' [-Wunused-variable] 879 | FAR struct bcmf_dev_s *priv = (FAR struct bcmf_dev_s *)dev->d_private; | ^~~~ Signed-off-by: liqinhui --- net/tcp/tcp_send_buffered.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c index 5ed0959a8f..090257ed1c 100644 --- a/net/tcp/tcp_send_buffered.c +++ b/net/tcp/tcp_send_buffered.c @@ -1058,11 +1058,11 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev, } ninfo("SEND: wrb=%p seq=%" PRIu32 " pktlen=%u sent=%u sndlen=%zu " - "mss=%u snd_wnd=%u seq=%" PRIu32 + "mss=%u snd_wnd=%" PRIu32 " seq=%" PRIu32 " remaining_snd_wnd=%" PRIu32 "\n", wrb, TCP_WBSEQNO(wrb), TCP_WBPKTLEN(wrb), TCP_WBSENT(wrb), sndlen, conn->mss, - conn->snd_wnd, seq, remaining_snd_wnd); + (uint32_t)conn->snd_wnd, seq, remaining_snd_wnd); /* The TCP stack updates sndseq on receipt of ACK *before* * this function is called. In that case sndseq will point