diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-14 11:42:12 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-14 11:42:12 +0100 |
commit | cd475225e4fd83fcc16b77ea1294c11428447209 (patch) | |
tree | 173b2afdd9df62bcb0f8131403f187f4bdf6e0d9 /src/consensus/gnunet-service-consensus.c | |
parent | e8aa266d849901eafbfc58ba116e1a39fb15ae02 (diff) | |
download | gnunet-cd475225e4fd83fcc16b77ea1294c11428447209.tar.gz gnunet-cd475225e4fd83fcc16b77ea1294c11428447209.zip |
fix misc clang compiler warnings
Diffstat (limited to 'src/consensus/gnunet-service-consensus.c')
-rw-r--r-- | src/consensus/gnunet-service-consensus.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c index 7911db8b0..4af7199aa 100644 --- a/src/consensus/gnunet-service-consensus.c +++ b/src/consensus/gnunet-service-consensus.c | |||
@@ -1341,7 +1341,10 @@ commit_set (struct ConsensusSession *session, | |||
1341 | if (PHASE_KIND_ALL_TO_ALL_2 == task->key.kind) | 1341 | if (PHASE_KIND_ALL_TO_ALL_2 == task->key.kind) |
1342 | { | 1342 | { |
1343 | struct GNUNET_SET_Element element; | 1343 | struct GNUNET_SET_Element element; |
1344 | struct ConsensusSizeElement cse = { 0 }; | 1344 | struct ConsensusSizeElement cse = { |
1345 | .size = 0, | ||
1346 | .sender_index = 0 | ||
1347 | }; | ||
1345 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "inserting size marker\n"); | 1348 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "inserting size marker\n"); |
1346 | cse.ce.marker = CONSENSUS_MARKER_SIZE; | 1349 | cse.ce.marker = CONSENSUS_MARKER_SIZE; |
1347 | cse.size = GNUNET_htonll (session->first_size); | 1350 | cse.size = GNUNET_htonll (session->first_size); |
@@ -1394,7 +1397,10 @@ commit_set (struct ConsensusSession *session, | |||
1394 | for (i = 0; i < evil.num; i++) | 1397 | for (i = 0; i < evil.num; i++) |
1395 | { | 1398 | { |
1396 | struct GNUNET_SET_Element element; | 1399 | struct GNUNET_SET_Element element; |
1397 | struct ConsensusStuffedElement se = { 0 }; | 1400 | struct ConsensusStuffedElement se = { |
1401 | .ce.payload_type = 0, | ||
1402 | .ce.marker = 0, | ||
1403 | }; | ||
1398 | element.data = &se; | 1404 | element.data = &se; |
1399 | element.size = sizeof (struct ConsensusStuffedElement); | 1405 | element.size = sizeof (struct ConsensusStuffedElement); |
1400 | element.element_type = GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT; | 1406 | element.element_type = GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT; |
@@ -2123,7 +2129,7 @@ task_start_reconcile (struct TaskEntry *task) | |||
2123 | 2129 | ||
2124 | if (task->key.peer1 == session->local_peer_idx) | 2130 | if (task->key.peer1 == session->local_peer_idx) |
2125 | { | 2131 | { |
2126 | struct GNUNET_CONSENSUS_RoundContextMessage rcm = { 0 }; | 2132 | struct GNUNET_CONSENSUS_RoundContextMessage rcm; |
2127 | 2133 | ||
2128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2134 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2129 | "P%u: Looking up set {%s} to run remote union\n", | 2135 | "P%u: Looking up set {%s} to run remote union\n", |
@@ -2138,6 +2144,7 @@ task_start_reconcile (struct TaskEntry *task) | |||
2138 | rcm.peer2 = htons (task->key.peer2); | 2144 | rcm.peer2 = htons (task->key.peer2); |
2139 | rcm.leader = htons (task->key.leader); | 2145 | rcm.leader = htons (task->key.leader); |
2140 | rcm.repetition = htons (task->key.repetition); | 2146 | rcm.repetition = htons (task->key.repetition); |
2147 | rcm.is_contested = htons (0); | ||
2141 | 2148 | ||
2142 | GNUNET_assert (NULL == setop->op); | 2149 | GNUNET_assert (NULL == setop->op); |
2143 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: initiating set op with P%u, our set is %s\n", | 2150 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: initiating set op with P%u, our set is %s\n", |