From 6925b61cfdf50a5686de02645b04b269c031f05d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 18 Sep 2018 15:32:25 -0400 Subject: Fix various GCC LTO warnings in the unit tests. --- src/test/test_routerset.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/test/test_routerset.c') diff --git a/src/test/test_routerset.c b/src/test/test_routerset.c index 2017ef0050..db7a6a54ea 100644 --- a/src/test/test_routerset.c +++ b/src/test/test_routerset.c @@ -1496,6 +1496,7 @@ NS(test_main)(void *arg) int r; (void)arg; + memset(&NS(mock_node), 0, sizeof(NS(mock_node))); NS(mock_node).ri = NULL; NS(mock_node).rs = NULL; @@ -1529,6 +1530,7 @@ NS(test_main)(void *arg) strncpy(rs.nickname, nickname, sizeof(rs.nickname) - 1); rs.nickname[sizeof(rs.nickname) - 1] = '\0'; + memset(&NS(mock_node), 0, sizeof(NS(mock_node))); NS(mock_node).ri = NULL; NS(mock_node).rs = &rs; @@ -1560,6 +1562,7 @@ NS(test_main)(void *arg) strmap_set_lc(set->names, nickname, (void *)1); ri.nickname = (char *)nickname; + memset(&mock_node, 0, sizeof(mock_node)); mock_node.ri = &ri; mock_node.rs = NULL; -- cgit v1.2.3-54-g00ecf