Skip to content
Commit 6fb34733 authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Mahesh Mahadevan
Browse files

samples: net: echo_server: Avoid warning about truncated writing



The truncation is not possible in practice but add suitable cast to
avoid the warning.

samples/net/sockets/echo_server/src/tcp.c:297:54: warning:
 ‘%d’ directive output may be truncated writing between 1 and 10 bytes
 into a region of size 5 [-Wformat-truncation=]
  297 |               snprintk(name, sizeof(name), "tcp4[%d]", slot);
      |                                             ^~~~~~~~~~

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@nordicsemi.no>
parent b29534f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment