Skip to content
Commit 0623b23f authored by Robert Lubos's avatar Robert Lubos Committed by Carles Cufí
Browse files

samples: net: echo_client: Fix build warning with IPv6 disabled



Building the sample with IPv4 only gives the following warning:

tcp.c:99:37: warning: array subscript 'struct sockaddr[0]' is partly
outside array bounds of 'struct sockaddr_in[1]' [-Warray-bounds]
  data->tcp.sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP);

This doesn't really seem like a valid one, but to get rid of it
workaround by specifying address family explicitly.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent fd2fa54a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment