gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 129/164: Fixed some warnings


From: gnunet
Subject: [gnunet] 129/164: Fixed some warnings
Date: Fri, 30 Jul 2021 15:33:15 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit 059c2fa97af5811f93ac6d2090f6dbfefbf24d7a
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Wed Jun 2 21:09:32 2021 +0200

    Fixed some warnings
---
 src/setu/gnunet-service-setu.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 4b8af2a22..b59ccad25 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -75,11 +75,6 @@
  */
 #define MAX_IBF_SIZE 1048576
 
-/**
- * Calculate min of two given Values
- */
-
-#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
 
 
 /**
@@ -759,7 +754,7 @@ static int in_shutdown;
  */
 static uint32_t suggest_id;
 
-
+#if MEASURE_PERFORMANCE
 /**
  * Handles configuration file for setu performance test
  *
@@ -770,7 +765,8 @@ static const struct GNUNET_CONFIGURATION_Handle *setu_cfg;
 /**
  * Stores the performance data for induvidual message
  */
-#if MEASURE_PERFORMANCE
+
+
 struct perf_num_send_received_msg
 {
   uint64_t sent;
@@ -939,7 +935,9 @@ calculate_perf_store ()
   /**
    * Calculate data sended size
    */
-  bytes_transmitted += sum_sent_received_bytes (4, perf_store.request_full);
+  bytes_transmitted += sum_sent_received_bytes (sizeof(struct
+                                                       
GNUNET_SETU_ResultMessage),
+                                                perf_store.request_full);
 
   bytes_transmitted += sum_sent_received_bytes (sizeof(struct
                                                        
GNUNET_SETU_ElementMessage),
@@ -948,7 +946,8 @@ calculate_perf_store ()
                                                        
GNUNET_SETU_ElementMessage),
                                                 perf_store.element);
   // bytes_transmitted += 
sum_sent_received_bytes(sizeof(GNUNET_MESSAGE_TYPE_SETU_P2P_OPERATION_REQUEST), 
perf_store.operation_request);
-  // bytes_transmitted += 
sum_sent_received_bytes(sizeof(GNUNET_MESSAGE_TYPE_SETU_P2P_SE), perf_store.se);
+  bytes_transmitted += sum_sent_received_bytes(sizeof(StrataEstimatorMessage),
+                                               perf_store.se);
   bytes_transmitted += sum_sent_received_bytes (4, perf_store.full_done);
   bytes_transmitted += sum_sent_received_bytes (sizeof(struct IBFMessage),
                                                 perf_store.ibf);
@@ -1177,7 +1176,7 @@ check_valid_phase (const uint8_t allowed_phases[], size_t 
size_phases, struct
 static int
 update_message_control_flow (struct GNUNET_CONTAINER_MultiHashMap *hash_map,
                              enum MESSAGE_CONTROL_FLOW_STATE new_mcfs,
-                             struct GNUNET_HashCode *hash_code,
+                             const struct GNUNET_HashCode *hash_code,
                              enum MESSAGE_TYPE mt)
 {
     struct message_control_flow_element *cfe = NULL;
@@ -1293,7 +1292,6 @@ determinate_done_message_iterator (void *cls,
                                    const struct GNUNET_HashCode *key,
                                    void *value)
 {
-    struct Operation *op = cls;
     struct message_control_flow_element *mcfe = value;
 
     if (((mcfe->element == MESSAGE_SENT) || (mcfe->element == 
MESSAGE_RECEIVED) ))
@@ -1340,7 +1338,6 @@ create_randomized_element_iterator (void *cls,
                                     void *value)
 {
     struct Operation *op = cls;
-    struct GNUNET_SETU_Element *element = value;
 
     struct GNUNET_HashContext *hashed_key_context =
             GNUNET_CRYPTO_hash_context_start ();
@@ -2092,7 +2089,7 @@ send_ibf (struct Operation *op,
                          buckets_in_message, &msg[1], 
msg->ibf_counter_bit_length);
         buckets_sent += buckets_in_message;
         LOG (GNUNET_ERROR_TYPE_DEBUG,
-             "ibf chunk size %u, %u/%u sent\n",
+             "ibf chunk size %u, %lu/%u sent\n",
              buckets_in_message,
              buckets_sent,
              ibf_size);
@@ -2596,6 +2593,7 @@ send_offers_iterator (void *cls,
  * @param op union operation
  * @param ibf_key IBF key of interest
  */
+ void
 send_offers_for_key (struct Operation *op,
                      struct IBF_Key ibf_key)
 {
@@ -5151,7 +5149,7 @@ handle_client_accept (void *cls,
                               1,
                               GNUNET_NO);
     {
-        const struct MultiStrataEstimator *se;
+        struct MultiStrataEstimator *se;
         struct GNUNET_MQ_Envelope *ev;
         struct StrataEstimatorMessage *strata_msg;
         char *buf;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]