gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: build: fix more warnings


From: gnunet
Subject: [gnunet] branch master updated: build: fix more warnings
Date: Mon, 09 Sep 2024 11:05:37 +0200

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

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 62140e2e9 build: fix more warnings
62140e2e9 is described below

commit 62140e2e95a6c9eeea33e51cc5fcaf587d113b52
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Sep 9 11:05:00 2024 +0200

    build: fix more warnings
---
 src/include/gnunet_common.h                        |  2 +-
 src/include/gnunet_nat_lib.h                       |  3 +++
 src/lib/util/common_logging.c                      |  6 ++---
 src/lib/util/test_crypto_hkdf.c                    |  8 +++----
 src/plugin/gns/plugin_gnsrecord_gns.c              | 20 ++++++++--------
 src/plugin/gnsrecord/plugin_gnsrecord_dns.c        | 10 ++++----
 src/plugin/reclaim/plugin_reclaim_credential_jwt.c | 20 ++++++++--------
 src/service/arm/gnunet-service-arm.c               | 18 +++++++--------
 src/service/dht/gnunet-dht-tvg.c                   |  8 +++----
 src/service/gns/gnunet-service-gns.c               |  4 +++-
 src/service/gns/gnunet-service-gns.h               |  2 +-
 .../hostlist/gnunet-daemon-hostlist_server.c       | 14 +++++------
 src/service/transport/gnunet-communicator-udp.c    |  2 +-
 src/service/transport/gnunet-service-transport.c   | 27 +++++++++++-----------
 14 files changed, 74 insertions(+), 70 deletions(-)

diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 3e6b7758a..f3ffa49f6 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -926,7 +926,7 @@ GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
  * @return number of bytes written.
  */
 size_t
-GNUNET_hex2b (char *src, void *dst, size_t dstlen, int invert);
+GNUNET_hex2b (const char *src, void *dst, size_t dstlen, int invert);
 
 /**
  * @ingroup logging
diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h
index 6acad72a5..49154648a 100644
--- a/src/include/gnunet_nat_lib.h
+++ b/src/include/gnunet_nat_lib.h
@@ -18,6 +18,7 @@
      SPDX-License-Identifier: AGPL3.0-or-later
  */
 
+#include "gnunet_common.h"
 #if !defined (__GNUNET_UTIL_LIB_H_INSIDE__)
 #error "Only <gnunet_util_lib.h> can be included directly."
 #endif
@@ -36,6 +37,7 @@
 #ifndef GNUNET_NAT_LIB_H
 #define GNUNET_NAT_LIB_H
 
+GNUNET_NETWORK_STRUCT_BEGIN
 /**
  * Wrapper struct with the avarage RTT of message to some peer
  * and if this peer und us is ready to sync.
@@ -68,6 +70,7 @@ struct GNUNET_BurstMessage
    */
   unsigned int local_port;
 };
+GNUNET_NETWORK_STRUCT_END
 
 /**
  * Struct wrapping information we use for starting the burst.
diff --git a/src/lib/util/common_logging.c b/src/lib/util/common_logging.c
index b85bd8994..e08b6b6fe 100644
--- a/src/lib/util/common_logging.c
+++ b/src/lib/util/common_logging.c
@@ -1523,10 +1523,10 @@ GNUNET_async_scope_get (struct GNUNET_AsyncScopeSave 
*scope_ret)
 
 
 size_t
-GNUNET_hex2b (char *src, void *dst, size_t dstlen, int invert)
+GNUNET_hex2b (const char *src, void *dst, size_t dstlen, int invert)
 {
-  char *line = src;
-  char *data = line;
+  const char *line = src;
+  const char *data = line;
   uint8_t *buf = dst;
   int off;
   int read_byte;
diff --git a/src/lib/util/test_crypto_hkdf.c b/src/lib/util/test_crypto_hkdf.c
index 134c4816d..99a8de6d1 100644
--- a/src/lib/util/test_crypto_hkdf.c
+++ b/src/lib/util/test_crypto_hkdf.c
@@ -31,7 +31,7 @@
 #include "gnunet_util_lib.h"
 
 
-void
+static void
 tc1 (void)
 {
   unsigned char ikm[22] =
@@ -61,7 +61,7 @@ tc1 (void)
 }
 
 
-void
+static void
 tc2 ()
 {
   unsigned char ikm[80] =
@@ -110,7 +110,7 @@ tc2 ()
 }
 
 
-void
+static void
 tc3 ()
 {
   unsigned char ikm[22] =
@@ -134,7 +134,7 @@ tc3 ()
 }
 
 
-void
+static void
 tc8 ()
 {
   unsigned char ikm[32] =
diff --git a/src/plugin/gns/plugin_gnsrecord_gns.c 
b/src/plugin/gns/plugin_gnsrecord_gns.c
index b048a3794..b87b292f9 100644
--- a/src/plugin/gns/plugin_gnsrecord_gns.c
+++ b/src/plugin/gns/plugin_gnsrecord_gns.c
@@ -306,19 +306,19 @@ gns_string_to_value (void *cls,
       size_t rest;
       unsigned int protocol;
       unsigned int service;
-      unsigned int record_type;
+      unsigned int rrtype;
       void *bval;
       size_t bval_size;
 
-      if (3 != sscanf (s, "%u %u %u ", &protocol, &service, &record_type))
+      if (3 != sscanf (s, "%u %u %u ", &protocol, &service, &rrtype))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     _ ("Unable to parse BOX record string `%s'\n"),
                     s);
         return GNUNET_SYSERR;
       }
-      rest = snprintf (NULL, 0, "%u %u %u ", protocol, service, record_type);
-      if (GNUNET_OK != GNUNET_GNSRECORD_string_to_value (record_type,
+      rest = snprintf (NULL, 0, "%u %u %u ", protocol, service, rrtype);
+      if (GNUNET_OK != GNUNET_GNSRECORD_string_to_value (rrtype,
                                                          &s[rest],
                                                          &bval,
                                                          &bval_size))
@@ -327,7 +327,7 @@ gns_string_to_value (void *cls,
       *data = box = GNUNET_malloc (*data_size);
       box->protocol = htons (protocol);
       box->service = htons (service);
-      box->record_type = htonl (record_type);
+      box->record_type = htonl (rrtype);
       GNUNET_memcpy (&box[1], bval, bval_size);
       GNUNET_free (bval);
       return GNUNET_OK;
@@ -338,13 +338,13 @@ gns_string_to_value (void *cls,
       char *prefix;
       char *p;
       char *underscore_prefix;
-      unsigned int record_type;
+      unsigned int rrtype;
       void *bval;
       size_t bval_size;
       size_t prefix_size;
 
       prefix = GNUNET_malloc (strlen (s) + 1);
-      if (2 != sscanf (s, "%s %u ", prefix, &record_type))
+      if (2 != sscanf (s, "%s %u ", prefix, &rrtype))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     _ ("Unable to parse SBOX record string `%s'\n"),
@@ -370,8 +370,8 @@ gns_string_to_value (void *cls,
         GNUNET_free (prefix);
         return GNUNET_SYSERR;
       }
-      rest = snprintf (NULL, 0, "%s %u ", prefix, record_type);
-      if (GNUNET_OK != GNUNET_GNSRECORD_string_to_value (record_type,
+      rest = snprintf (NULL, 0, "%s %u ", prefix, rrtype);
+      if (GNUNET_OK != GNUNET_GNSRECORD_string_to_value (rrtype,
                                                          &s[rest],
                                                          &bval,
                                                          &bval_size))
@@ -385,7 +385,7 @@ gns_string_to_value (void *cls,
       *data = GNUNET_malloc (*data_size);
       p = *data;
       box = *data;
-      box->record_type = htonl (record_type);
+      box->record_type = htonl (rrtype);
       p += sizeof(struct GNUNET_GNSRECORD_SBoxRecord);
       GNUNET_memcpy (p, prefix, prefix_size);
       p += prefix_size;
diff --git a/src/plugin/gnsrecord/plugin_gnsrecord_dns.c 
b/src/plugin/gnsrecord/plugin_gnsrecord_dns.c
index b689e94ce..c70be13e5 100644
--- a/src/plugin/gnsrecord/plugin_gnsrecord_dns.c
+++ b/src/plugin/gnsrecord/plugin_gnsrecord_dns.c
@@ -441,7 +441,7 @@ dns_string_to_value (void *cls,
       const char *keyp;
       const char *algp;
       const char *certp;
-      unsigned int type;
+      unsigned int cert_rrtype;
       unsigned int key;
       unsigned int alg;
       size_t cert_size;
@@ -451,8 +451,8 @@ dns_string_to_value (void *cls,
       sdup = GNUNET_strdup (s);
       typep = strtok (sdup, " ");
       if ((NULL == typep) ||
-          ((0 == (type = rfc4398_mnemonic_to_value (typep))) &&
-           ((1 != sscanf (typep, "%u", &type)) || (type > UINT16_MAX))))
+          ((0 == (cert_rrtype = rfc4398_mnemonic_to_value (typep))) &&
+           ((1 != sscanf (typep, "%u", &cert_rrtype)) || (cert_rrtype > 
UINT16_MAX))))
       {
         GNUNET_free (sdup);
         return GNUNET_SYSERR;
@@ -467,7 +467,7 @@ dns_string_to_value (void *cls,
       alg = 0;
       algp = strtok (NULL, " ");
       if ((NULL == algp) ||
-          ((0 == (type = rfc4034_mnemonic_to_value (typep))) &&
+          ((0 == (cert_rrtype = rfc4034_mnemonic_to_value (typep))) &&
            ((1 != sscanf (algp, "%u", &alg)) || (alg > UINT8_MAX))))
       {
         GNUNET_free (sdup);
@@ -483,7 +483,7 @@ dns_string_to_value (void *cls,
                                                 strlen (certp),
                                                 (void **) &cert_data);
       GNUNET_free (sdup);
-      cert.cert_type = type;
+      cert.cert_type = cert_rrtype;
       cert.cert_tag = key;
       cert.algorithm = alg;
       cert.certificate_size = cert_size;
diff --git a/src/plugin/reclaim/plugin_reclaim_credential_jwt.c 
b/src/plugin/reclaim/plugin_reclaim_credential_jwt.c
index 3eb4bfebf..3b1ab46a9 100644
--- a/src/plugin/reclaim/plugin_reclaim_credential_jwt.c
+++ b/src/plugin/reclaim/plugin_reclaim_credential_jwt.c
@@ -149,7 +149,7 @@ jwt_number_to_typename (void *cls, uint32_t type)
  * @param cred the jwt credential
  * @return a GNUNET_RECLAIM_Attribute, containing the new value
  */
-struct GNUNET_RECLAIM_AttributeList *
+static struct GNUNET_RECLAIM_AttributeList *
 jwt_parse_attributes (void *cls,
                       const char *data,
                       size_t data_size)
@@ -261,7 +261,7 @@ jwt_parse_attributes (void *cls,
  * @param cred the jwt credential
  * @return a GNUNET_RECLAIM_Attribute, containing the new value
  */
-struct GNUNET_RECLAIM_AttributeList *
+static struct GNUNET_RECLAIM_AttributeList *
 jwt_parse_attributes_c (void *cls,
                         const struct GNUNET_RECLAIM_Credential *cred)
 {
@@ -278,7 +278,7 @@ jwt_parse_attributes_c (void *cls,
  * @param cred the jwt credential
  * @return a GNUNET_RECLAIM_Attribute, containing the new value
  */
-struct GNUNET_RECLAIM_AttributeList *
+static struct GNUNET_RECLAIM_AttributeList *
 jwt_parse_attributes_p (void *cls,
                         const struct GNUNET_RECLAIM_Presentation *cred)
 {
@@ -295,7 +295,7 @@ jwt_parse_attributes_p (void *cls,
  * @param cred the jwt credential
  * @return a string, containing the isser
  */
-char *
+static char *
 jwt_get_issuer (void *cls,
                 const char *data,
                 size_t data_size)
@@ -339,7 +339,7 @@ jwt_get_issuer (void *cls,
  * @param cred the jwt credential
  * @return a string, containing the isser
  */
-char *
+static char *
 jwt_get_issuer_c (void *cls,
                   const struct GNUNET_RECLAIM_Credential *cred)
 {
@@ -356,7 +356,7 @@ jwt_get_issuer_c (void *cls,
  * @param cred the jwt credential
  * @return a string, containing the isser
  */
-char *
+static char *
 jwt_get_issuer_p (void *cls,
                   const struct GNUNET_RECLAIM_Presentation *cred)
 {
@@ -373,7 +373,7 @@ jwt_get_issuer_p (void *cls,
  * @param cred the jwt credential
  * @return a string, containing the isser
  */
-enum GNUNET_GenericReturnValue
+static enum GNUNET_GenericReturnValue
 jwt_get_expiration (void *cls,
                     const char *data,
                     size_t data_size,
@@ -417,7 +417,7 @@ jwt_get_expiration (void *cls,
  * @param cred the jwt credential
  * @return the expirati
  */
-enum GNUNET_GenericReturnValue
+static enum GNUNET_GenericReturnValue
 jwt_get_expiration_c (void *cls,
                       const struct GNUNET_RECLAIM_Credential *cred,
                       struct GNUNET_TIME_Absolute *exp)
@@ -435,7 +435,7 @@ jwt_get_expiration_c (void *cls,
  * @param cred the jwt credential
  * @return a string, containing the isser
  */
-enum GNUNET_GenericReturnValue
+static enum GNUNET_GenericReturnValue
 jwt_get_expiration_p (void *cls,
                       const struct GNUNET_RECLAIM_Presentation *cred,
                       struct GNUNET_TIME_Absolute *exp)
@@ -446,7 +446,7 @@ jwt_get_expiration_p (void *cls,
 }
 
 
-enum GNUNET_GenericReturnValue
+static enum GNUNET_GenericReturnValue
 jwt_create_presentation (void *cls,
                          const struct GNUNET_RECLAIM_Credential *cred,
                          const struct GNUNET_RECLAIM_AttributeList *attrs,
diff --git a/src/service/arm/gnunet-service-arm.c 
b/src/service/arm/gnunet-service-arm.c
index 71e4e40cb..c97c400a8 100644
--- a/src/service/arm/gnunet-service-arm.c
+++ b/src/service/arm/gnunet-service-arm.c
@@ -340,7 +340,7 @@ add_unixpath (struct sockaddr **saddrs,
  */
 static int
 get_server_addresses (const char *service_name,
-                      const struct GNUNET_CONFIGURATION_Handle *cfg,
+                      const struct GNUNET_CONFIGURATION_Handle *cfg_,
                       struct sockaddr ***addrs,
                       socklen_t **addr_lens)
 {
@@ -365,7 +365,7 @@ get_server_addresses (const char *service_name,
   desc = NULL;
   disablev6 = GNUNET_NO;
   if (GNUNET_SYSERR ==
-      (disablev6 = GNUNET_CONFIGURATION_get_value_yesno (cfg,
+      (disablev6 = GNUNET_CONFIGURATION_get_value_yesno (cfg_,
                                                          service_name,
                                                          "DISABLEV6")))
     return GNUNET_SYSERR;
@@ -396,10 +396,10 @@ get_server_addresses (const char *service_name,
   }
 
   port = 0;
-  if (GNUNET_CONFIGURATION_have_value (cfg, service_name, "PORT"))
+  if (GNUNET_CONFIGURATION_have_value (cfg_, service_name, "PORT"))
   {
     if (GNUNET_OK !=
-        GNUNET_CONFIGURATION_get_value_number (cfg,
+        GNUNET_CONFIGURATION_get_value_number (cfg_,
                                                service_name,
                                                "PORT",
                                                &port))
@@ -419,7 +419,7 @@ get_server_addresses (const char *service_name,
 
   hostname = NULL;
   GNUNET_break (GNUNET_SYSERR !=
-                GNUNET_CONFIGURATION_get_value_string (cfg,
+                GNUNET_CONFIGURATION_get_value_string (cfg_,
                                                        service_name,
                                                        "BINDTO",
                                                        &hostname));
@@ -427,7 +427,7 @@ get_server_addresses (const char *service_name,
   abstract = GNUNET_NO;
 #ifdef AF_UNIX
   if ( (GNUNET_OK ==
-        GNUNET_CONFIGURATION_get_value_filename (cfg,
+        GNUNET_CONFIGURATION_get_value_filename (cfg_,
                                                  service_name,
                                                  "UNIXPATH",
                                                  &unixpath)) &&
@@ -488,7 +488,7 @@ get_server_addresses (const char *service_name,
   if ((0 == port) && (NULL == unixpath))
   {
     if (GNUNET_YES ==
-        GNUNET_CONFIGURATION_get_value_yesno (cfg,
+        GNUNET_CONFIGURATION_get_value_yesno (cfg_,
                                               service_name,
                                               "START_ON_DEMAND"))
       LOG (GNUNET_ERROR_TYPE_ERROR,
@@ -1520,12 +1520,12 @@ do_shutdown ()
  * @return number of active services found
  */
 static unsigned int
-list_count (struct ServiceList *running_head)
+list_count (struct ServiceList *run_head)
 {
   struct ServiceList *i;
   unsigned int res;
 
-  for (res = 0, i = running_head; NULL != i; i = i->next, res++)
+  for (res = 0, i = run_head; NULL != i; i = i->next, res++)
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%s\n", i->name);
   return res;
 }
diff --git a/src/service/dht/gnunet-dht-tvg.c b/src/service/dht/gnunet-dht-tvg.c
index 835bdc25c..58fdb2b38 100644
--- a/src/service/dht/gnunet-dht-tvg.c
+++ b/src/service/dht/gnunet-dht-tvg.c
@@ -32,7 +32,7 @@
 #include "dht_helper.h"
 #include <inttypes.h>
 
-static char* peers_str[] = {
+static const char*peers_str[] = {
   "a4bba7746dfd3432da2a11c57b248b2d6b14eafb3ad54401c44bd37f232d1ce5",
   "02163d1dde228f9796c5327c781b4e5880ebf356204d3c4cceb9a77ae32157d7",
   "859836011003dc5d0cd84418812e381f3989797fb994464a52e3b7ad954c2695",
@@ -61,8 +61,8 @@ run (void *cls,
   struct GNUNET_HashCode key; // FIXME set to key
   enum GNUNET_DHT_RouteOption ro = GNUNET_DHT_RO_RECORD_ROUTE;
   size_t msize;
-  uint64_t i = 23;
-  uint8_t *block_data = (uint8_t*) &i;
+  uint64_t data_num = 23;
+  uint8_t *block_data = (uint8_t*) &data_num;
   size_t block_len = 8;
   unsigned int put_path_len = 0;
   size_t putlen;
@@ -73,7 +73,7 @@ run (void *cls,
 
   for (int i = 0; i < NUM_PEERS; i++)
   {
-    GNUNET_hex2b(peers_str[i], &peers_sk[i], sizeof peers_sk[i], 0);
+    GNUNET_hex2b (peers_str[i], &peers_sk[i], sizeof peers_sk[i], 0);
     GNUNET_CRYPTO_eddsa_key_get_public (&peers_sk[i],
                                         &peers[i].public_key);
     GNUNET_CRYPTO_hash (&peers[i], sizeof (struct GNUNET_PeerIdentity), &
diff --git a/src/service/gns/gnunet-service-gns.c 
b/src/service/gns/gnunet-service-gns.c
index aaf82a557..7003c29f5 100644
--- a/src/service/gns/gnunet-service-gns.c
+++ b/src/service/gns/gnunet-service-gns.c
@@ -23,6 +23,7 @@
  * @author Martin Schanzenbach
  * @author Christian Grothoff
  */
+#include "gnunet_common.h"
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_dns_service.h"
@@ -32,6 +33,7 @@
 #include "gnunet_gns_service.h"
 #include "gnunet_statistics_service.h"
 #include "gns.h"
+#include "gnunet-service-gns.h"
 #include "gnunet-service-gns_resolver.h"
 #include "gnunet-service-gns_interceptor.h"
 #include "gnunet_protocols.h"
@@ -174,7 +176,7 @@ static struct GNS_TopLevelDomain *tld_tail;
  * @param[out] pkey public key to set
  * @return #GNUNET_YES if @a tld was found #GNUNET_NO if not
  */
-int
+enum GNUNET_GenericReturnValue
 GNS_find_tld (const char *tld_str,
               struct GNUNET_CRYPTO_PublicKey *pkey)
 {
diff --git a/src/service/gns/gnunet-service-gns.h 
b/src/service/gns/gnunet-service-gns.h
index 13e28349c..a8fc91939 100644
--- a/src/service/gns/gnunet-service-gns.h
+++ b/src/service/gns/gnunet-service-gns.h
@@ -35,7 +35,7 @@
  * @param[out] pkey public key to set
  * @return #GNUNET_YES if @a tld was found #GNUNET_NO if not
  */
-int
+enum GNUNET_GenericReturnValue
 GNS_find_tld (const char *tld_str,
               struct GNUNET_CRYPTO_PublicKey *pkey);
 
diff --git a/src/service/hostlist/gnunet-daemon-hostlist_server.c 
b/src/service/hostlist/gnunet-daemon-hostlist_server.c
index b9c0b4bf8..51257af96 100644
--- a/src/service/hostlist/gnunet-daemon-hostlist_server.c
+++ b/src/service/hostlist/gnunet-daemon-hostlist_server.c
@@ -152,18 +152,18 @@ static struct HostSet *builder;
  * @param response response to add headers to
  */
 static void
-add_cors_headers (struct MHD_Response *response)
+add_cors_headers (struct MHD_Response *resp)
 {
-  MHD_add_response_header (response, "Access-Control-Allow-Origin", "*");
-  MHD_add_response_header (response,
+  MHD_add_response_header (resp, "Access-Control-Allow-Origin", "*");
+  MHD_add_response_header (resp,
                            "Access-Control-Allow-Methods",
                            "GET, OPTIONS");
-  MHD_add_response_header (response, "Access-Control-Max-Age", "86400");
+  MHD_add_response_header (resp, "Access-Control-Max-Age", "86400");
 }
 
 
 static struct MHD_Response*
-build_json_response (const struct HostSet *builder)
+build_json_response (const struct HostSet *bu)
 {
   struct GNUNET_MessageHeader *hello;
   struct GNUNET_HELLO_Builder *hbuilder;
@@ -175,9 +175,9 @@ build_json_response (const struct HostSet *builder)
 
   hello_uri_j = json_object ();
   hello_array = json_array ();
-  while (offset < builder->size)
+  while (offset < bu->size)
   {
-    hello = (struct GNUNET_MessageHeader*) (builder->data + offset);
+    hello = (struct GNUNET_MessageHeader*) (bu->data + offset);
     hbuilder = GNUNET_HELLO_builder_from_msg (hello);
     hello_uri = GNUNET_HELLO_builder_to_url (hbuilder, NULL);
     json_array_append_new (hello_array, json_string (hello_uri));
diff --git a/src/service/transport/gnunet-communicator-udp.c 
b/src/service/transport/gnunet-communicator-udp.c
index 4d37b19a1..860d74312 100644
--- a/src/service/transport/gnunet-communicator-udp.c
+++ b/src/service/transport/gnunet-communicator-udp.c
@@ -1509,7 +1509,7 @@ setup_receiver_mq (struct ReceiverAddress *receiver);
  * @param ss_list_tail the oldest secret in the list of interest.
  * @return number of deleted secrets.
  */
-unsigned int
+static unsigned int
 purge_secrets (struct SharedSecret *ss_list_tail)
 {
   struct SharedSecret *pos;
diff --git a/src/service/transport/gnunet-service-transport.c 
b/src/service/transport/gnunet-service-transport.c
index d32681028..9da5b9446 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -5645,14 +5645,14 @@ check_vl_transmission (struct VirtualLink *vl)
       for (struct DistanceVectorHop *pos = dv->dv_head; NULL != pos;
            pos = pos->next_dv)
       {
-        struct Neighbour *nh = pos->next_hop;
+        struct Neighbour *nh_iter = pos->next_hop;
 
 
         if (pos->path_valid_until.abs_value_us <= now.abs_value_us)
           continue;   /* skip this one: path not validated */
         else
         {
-          vl_next_hop = lookup_virtual_link (&nh->pid);
+          vl_next_hop = lookup_virtual_link (&nh_iter->pid);
           GNUNET_assert (NULL != vl_next_hop);
           if (pm->bytes_msg + vl_next_hop->outbound_fc_window_size_used >
               vl_next_hop->outbound_fc_window_size)
@@ -5670,14 +5670,14 @@ check_vl_transmission (struct VirtualLink *vl)
             consider_sending_fc (vl_next_hop);
             continue; /* We have a message, but flow control says "nope" for 
the first hop of this path */
           }
-          for (struct Queue *queue = nh->queue_head; NULL != queue;
+          for (struct Queue *queue = nh_iter->queue_head; NULL != queue;
                queue = queue->next_neighbour)
             if ((GNUNET_YES == queue->idle) &&
                 (queue->validated_until.abs_value_us > now.abs_value_us))
             {
               GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                           "Next hop neighbour %s not stalled\n",
-                          GNUNET_i2s (&nh->pid));
+                          GNUNET_i2s (&nh_iter->pid));
               schedule_transmit_on_queue (GNUNET_TIME_UNIT_ZERO,
                                           queue,
                                           
GNUNET_SCHEDULER_PRIORITY_BACKGROUND);
@@ -6741,14 +6741,14 @@ check_reliability_box (void *cls,
                        const struct TransportReliabilityBoxMessage *rb)
 {
   (void) cls;
-  const struct GNUNET_MessageHeader *inbox =  (const struct
+  const struct GNUNET_MessageHeader *box =  (const struct
                                                GNUNET_MessageHeader *) &rb[1];
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "check_send_msg with size %u: inner msg type %u and size %u (%lu 
%lu)\n",
               ntohs (rb->header.size),
-              ntohs (inbox->type),
-              ntohs (inbox->size),
+              ntohs (box->type),
+              ntohs (box->size),
               sizeof (struct TransportReliabilityBoxMessage),
               sizeof (struct GNUNET_MessageHeader));
   GNUNET_MQ_check_boxed_message (rb);
@@ -10075,9 +10075,8 @@ handle_flow_control (void *cls, const struct 
TransportFlowControlMessage *fc)
 
     for (int i = 1; i <= number_of_addresses; i++)
     {
-      struct TransportGlobalNattedAddress *tgna = (struct
-                                                   TransportGlobalNattedAddress
-                                                   *) &tgnas[off];
+      struct TransportGlobalNattedAddress *tgna;
+      tgna = (struct TransportGlobalNattedAddress*) &tgnas[off];
       char *addr = (char *) &tgna[1];
       unsigned int address_length;
 
@@ -10384,23 +10383,23 @@ fragment_message (struct Queue *queue,
     char *msg;
     uint16_t fragmax;
     uint16_t fragsize;
-    uint16_t msize;
+    uint16_t msize_ff;
     uint16_t xoff = 0;
     pm->frag_count++;
 
     orig = (const char *) &ff[1];
-    msize = ff->bytes_msg;
+    msize_ff = ff->bytes_msg;
     if (pm != ff)
     {
       const struct TransportFragmentBoxMessage *tfbo;
 
       tfbo = (const struct TransportFragmentBoxMessage *) orig;
       orig += sizeof(struct TransportFragmentBoxMessage);
-      msize -= sizeof(struct TransportFragmentBoxMessage);
+      msize_ff -= sizeof(struct TransportFragmentBoxMessage);
       xoff = ntohs (tfbo->frag_off);
     }
     fragmax = mtu - sizeof(struct TransportFragmentBoxMessage);
-    fragsize = GNUNET_MIN (msize - ff->frag_off, fragmax);
+    fragsize = GNUNET_MIN (msize_ff - ff->frag_off, fragmax);
     frag =
       GNUNET_malloc (sizeof(struct PendingMessage)
                      + sizeof(struct TransportFragmentBoxMessage) + fragsize);

-- 
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]