Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion subsys/net/ip/tcp2_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"send_win=%hu, mss=%hu", \
(_conn), net_pkt_get_len((_conn)->send_data), \
conn->unacked_len, conn->send_win, \
conn_mss((_conn))); \
(uint16_t)conn_mss((_conn))); \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can llvm be complaining about this? conn_mss produces either a value from tcp_options::mss which is uint16_t, or a constant that's explicitly cast to uint16_t. Is a preprocessor define causing something to not be what it appears to be?

Within that limit: ideally the code would not be assuming that uint16_t is a short. If the h length modifier is to be used, the argument should be cast to unsigned short. Otherwise just use %u, it'll work out due to the implicit conversion to int (and, if the value actually isn't representable in uint16_t the resulting output might show what's going on).

Not blocking, just don't think this has been fully investigated.

NET_DBG("conn: %p send_data_timer=%hu, send_data_retries=%hu", \
(_conn), \
(bool)k_delayed_work_remaining_get(&(_conn)->send_data_timer),\
Expand Down