From: Tommi Rantala <[email protected]>
tipc-pipe.c:643:9: warning: missing initializer for field 'timeout' of 'struct
tipc_subscr'
struct tipc_subscr subscr = { {0} };
^~~~~~~~~~~
---
tipc-pipe/tipc-pipe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tipc-pipe/tipc-pipe.c b/tipc-pipe/tipc-pipe.c
index 20781cf..7bb3001 100644
--- a/tipc-pipe/tipc-pipe.c
+++ b/tipc-pipe/tipc-pipe.c
@@ -640,7 +640,7 @@ int run_client(int tipc)
int run_topology_client(int lower, int upper, unsigned int timeout)
{
struct sockaddr_tipc topsrv;
- struct tipc_subscr subscr = { {0} };
+ struct tipc_subscr subscr;
int sd = socket(AF_TIPC, SOCK_SEQPACKET, 0);
const char *event_name [] = {
@@ -651,6 +651,7 @@ int run_topology_client(int lower, int upper, unsigned int
timeout)
tipc_addr_set(&topsrv, TIPC_ADDR_NAME, TIPC_TOP_SRV, TIPC_TOP_SRV, 0);
chkne(connect(sd, (void *)&topsrv, sizeof(topsrv)));
+ memset(&subscr, 0, sizeof(subscr));
subscr.seq.type = htonl(server_type);
subscr.seq.lower = htonl(lower);
subscr.seq.upper = htonl(upper);
--
2.9.3
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion