diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-18 15:32:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-10-14 15:25:16 -0400 |
commit | 6925b61cfdf50a5686de02645b04b269c031f05d (patch) | |
tree | 414c55b16bb61f16ae70b78458da6e1020da7c7f /src/test/test_routerset.c | |
parent | 7c8f20ba44a831ed9f714453fa776762d1c872c5 (diff) | |
download | tor-6925b61cfdf50a5686de02645b04b269c031f05d.tar.gz tor-6925b61cfdf50a5686de02645b04b269c031f05d.zip |
Fix various GCC LTO warnings in the unit tests.
Diffstat (limited to 'src/test/test_routerset.c')
-rw-r--r-- | src/test/test_routerset.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |