[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: fix misc clang compiler war
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: fix misc clang compiler warnings |
Date: |
Tue, 14 Mar 2017 11:42:14 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new cd475225e fix misc clang compiler warnings
cd475225e is described below
commit cd475225e4fd83fcc16b77ea1294c11428447209
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Mar 14 11:42:12 2017 +0100
fix misc clang compiler warnings
---
src/consensus/consensus_protocol.h | 18 +++++++++---------
src/consensus/gnunet-service-consensus.c | 13 ++++++++++---
src/dv/gnunet-service-dv.c | 4 ++--
3 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/src/consensus/consensus_protocol.h
b/src/consensus/consensus_protocol.h
index e0002de56..320d460c7 100644
--- a/src/consensus/consensus_protocol.h
+++ b/src/consensus/consensus_protocol.h
@@ -45,37 +45,37 @@ GNUNET_NETWORK_STRUCT_BEGIN
struct GNUNET_CONSENSUS_RoundContextMessage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ROUND_CONTEXT
+ * Type: #GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ROUND_CONTEXT
*/
struct GNUNET_MessageHeader header;
/**
* A value from 'enum PhaseKind'.
*/
- uint16_t kind;
+ uint16_t kind GNUNET_PACKED;
/**
* Number of the first peer
* in canonical order.
*/
- int16_t peer1;
+ int16_t peer1 GNUNET_PACKED;
/**
* Number of the second peer in canonical order.
*/
- int16_t peer2;
+ int16_t peer2 GNUNET_PACKED;
/**
* Repetition of the gradecast phase.
*/
- int16_t repetition;
+ int16_t repetition GNUNET_PACKED;
/**
* Leader in the gradecast phase.
*
* Can be different from both peer1 and peer2.
*/
- int16_t leader;
+ int16_t leader GNUNET_PACKED;
/**
* Non-zero if this set reconciliation
@@ -85,7 +85,7 @@ struct GNUNET_CONSENSUS_RoundContextMessage
*
* Ignored for set operations that are not within gradecasts.
*/
- uint16_t is_contested;
+ uint16_t is_contested GNUNET_PACKED;
};
@@ -104,12 +104,12 @@ struct ConsensusElement
* Payload element_type, only valid
* if this is not a marker element.
*/
- uint16_t payload_type;
+ uint16_t payload_type GNUNET_PACKED;
/**
* Is this a marker element?
*/
- uint8_t marker;
+ uint8_t marker GNUNET_PACKED;
/* rest: element data */
};
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,
if (PHASE_KIND_ALL_TO_ALL_2 == task->key.kind)
{
struct GNUNET_SET_Element element;
- struct ConsensusSizeElement cse = { 0 };
+ struct ConsensusSizeElement cse = {
+ .size = 0,
+ .sender_index = 0
+ };
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "inserting size marker\n");
cse.ce.marker = CONSENSUS_MARKER_SIZE;
cse.size = GNUNET_htonll (session->first_size);
@@ -1394,7 +1397,10 @@ commit_set (struct ConsensusSession *session,
for (i = 0; i < evil.num; i++)
{
struct GNUNET_SET_Element element;
- struct ConsensusStuffedElement se = { 0 };
+ struct ConsensusStuffedElement se = {
+ .ce.payload_type = 0,
+ .ce.marker = 0,
+ };
element.data = &se;
element.size = sizeof (struct ConsensusStuffedElement);
element.element_type = GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT;
@@ -2123,7 +2129,7 @@ task_start_reconcile (struct TaskEntry *task)
if (task->key.peer1 == session->local_peer_idx)
{
- struct GNUNET_CONSENSUS_RoundContextMessage rcm = { 0 };
+ struct GNUNET_CONSENSUS_RoundContextMessage rcm;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"P%u: Looking up set {%s} to run remote union\n",
@@ -2138,6 +2144,7 @@ task_start_reconcile (struct TaskEntry *task)
rcm.peer2 = htons (task->key.peer2);
rcm.leader = htons (task->key.leader);
rcm.repetition = htons (task->key.repetition);
+ rcm.is_contested = htons (0);
GNUNET_assert (NULL == setop->op);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%u: initiating set op with P%u, our
set is %s\n",
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c
index 7d101c8ae..3fbd0cc03 100644
--- a/src/dv/gnunet-service-dv.c
+++ b/src/dv/gnunet-service-dv.c
@@ -1530,7 +1530,7 @@ listen_set_union (void *cls,
GNUNET_SET_OPERATION_UNION);
neighbor->set_op = GNUNET_SET_accept (request,
GNUNET_SET_RESULT_ADDED,
- (struct GNUNET_SET_Option[]) { 0 },
+ (struct GNUNET_SET_Option[]) {{ 0 }},
&handle_set_union_result,
neighbor);
neighbor->consensus_insertion_offset = 0;
@@ -1561,7 +1561,7 @@ initiate_set_union (void *cls)
&neighbor->real_session_id,
NULL,
GNUNET_SET_RESULT_ADDED,
- (struct GNUNET_SET_Option[]) { 0 },
+ (struct GNUNET_SET_Option[]) {{ 0 }},
&handle_set_union_result,
neighbor);
neighbor->consensus_insertion_offset = 0;
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: fix misc clang compiler warnings,
gnunet <=