gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 02/02: build: fix even more compile warnings


From: gnunet
Subject: [gnunet] 02/02: build: fix even more compile warnings
Date: Tue, 10 Sep 2024 16:12:32 +0200

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

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

commit c6bedf91d08eede192d8b0e703acaf495c1c9855
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Sep 10 16:12:23 2024 +0200

    build: fix even more compile warnings
---
 src/include/gnu_name_system_protocols.h            |   5 +
 src/lib/gnsrecord/gnunet-gnsrecord-tvg.c           |  10 +-
 src/lib/gnsrecord/test_gnsrecord_crypto.c          |   2 +-
 src/lib/gnsrecord/test_gnsrecord_testvectors.c     |  38 ++--
 src/lib/testing/testing_api_topology.c             | 187 ++++++++----------
 src/lib/util/test_container_heap.c                 |  99 +++++-----
 src/lib/util/test_container_multipeermap.c         |  15 +-
 src/service/fs/fs_api.c                            | 214 +++++++++++----------
 src/service/reclaim/did_helper.c                   |   9 -
 src/service/reclaim/did_helper.h                   |   6 -
 src/service/reclaim/test_did_helper.c              |  11 +-
 .../transport/transport_api2_communication.c       |   6 +-
 src/service/transport/transport_api2_core.c        |   4 +-
 13 files changed, 297 insertions(+), 309 deletions(-)

diff --git a/src/include/gnu_name_system_protocols.h 
b/src/include/gnu_name_system_protocols.h
index c10eef468..60508d175 100644
--- a/src/include/gnu_name_system_protocols.h
+++ b/src/include/gnu_name_system_protocols.h
@@ -58,6 +58,9 @@ struct GNUNET_GNS_Protocol GNUNET_GNS_Protocols[] = {
   }
 };
 
+uint16_t
+GNUNET_GNS_protocol_name_to_number (const char *name);
+
 uint16_t
 GNUNET_GNS_protocol_name_to_number (const char *name)
 {
@@ -71,6 +74,8 @@ GNUNET_GNS_protocol_name_to_number (const char *name)
   return 0;
 }
 
+const char*
+GNUNET_GNS_protocol_number_to_name (uint16_t number);
 
 const char*
 GNUNET_GNS_protocol_number_to_name (uint16_t number)
diff --git a/src/lib/gnsrecord/gnunet-gnsrecord-tvg.c 
b/src/lib/gnsrecord/gnunet-gnsrecord-tvg.c
index 746e95c32..7ec384249 100644
--- a/src/lib/gnsrecord/gnunet-gnsrecord-tvg.c
+++ b/src/lib/gnsrecord/gnunet-gnsrecord-tvg.c
@@ -33,18 +33,18 @@
 #include <inttypes.h>
 
 
-static char *d_pkey =
+static const char *d_pkey =
   "50d7b652a4efeadff37396909785e5952171a02178c8e7d450fa907925fafd98";
 
-static char *d_edkey =
+static const char *d_edkey =
   "5af7020ee19160328832352bbc6a68a8d71a7cbe1b929969a7c66d415a0d8f65";
 
 
 static int
-parsehex (char *src, char *dst, size_t dstlen, int invert)
+parsehex (const char *src, char *dst, size_t dstlen, int invert)
 {
-  char *line = src;
-  char *data = line;
+  const char *line = src;
+  const char *data = line;
   int off;
   int read_byte;
   int data_len = 0;
diff --git a/src/lib/gnsrecord/test_gnsrecord_crypto.c 
b/src/lib/gnsrecord/test_gnsrecord_crypto.c
index 34f5f35e5..9849f6e43 100644
--- a/src/lib/gnsrecord/test_gnsrecord_crypto.c
+++ b/src/lib/gnsrecord/test_gnsrecord_crypto.c
@@ -42,7 +42,7 @@
 
 static struct GNUNET_GNSRECORD_Data *s_rd;
 
-static char *s_name;
+static const char *s_name;
 
 static int res;
 
diff --git a/src/lib/gnsrecord/test_gnsrecord_testvectors.c 
b/src/lib/gnsrecord/test_gnsrecord_testvectors.c
index 12b9efe56..8ecaf39ee 100644
--- a/src/lib/gnsrecord/test_gnsrecord_testvectors.c
+++ b/src/lib/gnsrecord/test_gnsrecord_testvectors.c
@@ -11,24 +11,24 @@ struct GnsTv
 {
   uint32_t expected_rd_count;
   struct GNUNET_GNSRECORD_Data expected_rd[2048];
-  char *d;
-  char *zid;
-  char *ztld;
-  char *label;
-  char *q;
-  char *rdata;
-  char *rrblock;
-  char *k;
-  char *nonce;
+  const char *d;
+  const char *zid;
+  const char *ztld;
+  const char *label;
+  const char *q;
+  const char *rdata;
+  const char *rrblock;
+  const char *k;
+  const char *nonce;
 };
 
 struct RevocationTv
 {
-  char *d;
-  char *zid;
-  char *ztld;
-  char *m;
-  char *proof;
+  const char *d;
+  const char *zid;
+  const char *ztld;
+  const char *m;
+  const char *proof;
   int diff;
   int epochs;
 };
@@ -437,8 +437,8 @@ print_bytes (void *buf,
 }
 
 
-int
-parsehex (char *src, char *dst, size_t dstlen, int invert)
+static int
+parsehex (const char *src, char *dst, size_t dstlen, int invert)
 {
   int off;
   int read_byte;
@@ -468,7 +468,7 @@ parsehex (char *src, char *dst, size_t dstlen, int invert)
 }
 
 
-void
+static void
 res_checker (void *cls,
              unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd)
 {
@@ -525,7 +525,7 @@ res_checker (void *cls,
 }
 
 
-enum GNUNET_GenericReturnValue
+static enum GNUNET_GenericReturnValue
 check_derivations_edkey (const char*label,
                          struct GNUNET_TIME_Absolute expire,
                          struct GNUNET_CRYPTO_PublicKey *pub,
@@ -563,7 +563,7 @@ check_derivations_edkey (const char*label,
 }
 
 
-enum GNUNET_GenericReturnValue
+static enum GNUNET_GenericReturnValue
 check_derivations_pkey (const char*label,
                         struct GNUNET_TIME_Absolute expire,
                         struct GNUNET_CRYPTO_PublicKey *pub,
diff --git a/src/lib/testing/testing_api_topology.c 
b/src/lib/testing/testing_api_topology.c
index 5710c5244..b2fd0f72b 100644
--- a/src/lib/testing/testing_api_topology.c
+++ b/src/lib/testing/testing_api_topology.c
@@ -29,6 +29,7 @@
  * @author Christian Grothoff
  *
  */
+#include "gnunet_common.h"
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_testing_lib.h"
@@ -276,58 +277,10 @@ GNUNET_TESTING_get_connections (unsigned int num,
 }
 
 
-int
-free_nodes_cb (void *cls,
-               const struct GNUNET_ShortHashCode *key,
-               void *value)
-{
-  (void) cls;
-  struct GNUNET_TESTING_NetjailNode *node = value;
-  struct GNUNET_TESTING_NodeConnection *pos_connection;
-  struct GNUNET_TESTING_AddressPrefix *pos_prefix;
-
-  while (NULL != (pos_connection = node->node_connections_head))
-  {
-    while (NULL != (pos_prefix = pos_connection->address_prefixes_head))
-    {
-      GNUNET_CONTAINER_DLL_remove (pos_connection->address_prefixes_head,
-                                   pos_connection->address_prefixes_tail,
-                                   pos_prefix);
-      GNUNET_free (pos_prefix->address_prefix);
-      GNUNET_free (pos_prefix);
-    }
-    GNUNET_CONTAINER_DLL_remove (node->node_connections_head,
-                                 node->node_connections_tail,
-                                 pos_connection);
-    GNUNET_free (pos_connection);
-  }
-
-  GNUNET_free (node->plugin);
-  GNUNET_free (node);
-  return GNUNET_OK;
-}
-
-
-int
-free_namespaces_cb (void *cls,
-                    const struct GNUNET_ShortHashCode *key,
-                    void *value)
-{
-  (void) cls;
-  struct GNUNET_TESTING_NetjailNamespace *namespace = value;
-
-  GNUNET_free (namespace->router);
-  GNUNET_CONTAINER_multishortmap_iterate (namespace->nodes, free_nodes_cb,
-                                          namespace->nodes);
-  return GNUNET_OK;
-
-}
-
-
 static int
 free_value_cb (void *cls,
-                    const struct GNUNET_ShortHashCode *key,
-                    void *value)
+               const struct GNUNET_ShortHashCode *key,
+               void *value)
 {
   (void) cls;
 
@@ -339,8 +292,8 @@ free_value_cb (void *cls,
 
 static int
 free_subnets_cb (void *cls,
-                    const struct GNUNET_ShortHashCode *key,
-                    void *value)
+                 const struct GNUNET_ShortHashCode *key,
+                 void *value)
 {
   (void) cls;
   struct GNUNET_TESTING_NetjailSubnet *subnet = value;
@@ -357,8 +310,8 @@ free_subnets_cb (void *cls,
 
 static int
 free_carriers_cb (void *cls,
-                    const struct GNUNET_ShortHashCode *key,
-                    void *value)
+                  const struct GNUNET_ShortHashCode *key,
+                  void *value)
 {
   (void) cls;
   struct GNUNET_TESTING_NetjailCarrier *carrier = value;
@@ -448,7 +401,7 @@ GNUNET_TESTING_get_address (struct 
GNUNET_TESTING_NodeConnection *connection,
 {
   struct GNUNET_TESTING_NetjailNode *node;
   char *addr;
-  char *template;
+  const char *template;
   unsigned int node_n;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -532,6 +485,7 @@ GNUNET_TESTING_get_additional_connects (unsigned int num,
   return node->additional_connects;
 }
 
+
 char *
 GNUNET_TESTING_get_plugin_from_topo (
   struct GNUNET_TESTING_NetjailTopology *njt,
@@ -543,8 +497,8 @@ GNUNET_TESTING_get_plugin_from_topo (
 
 static void
 create_subnet_peers (struct GNUNET_CONFIGURATION_Handle *cfg,
-               struct GNUNET_TESTING_NetjailTopology *topology,
-               struct GNUNET_TESTING_NetjailSubnet *subnet)
+                     struct GNUNET_TESTING_NetjailTopology *topology,
+                     struct GNUNET_TESTING_NetjailSubnet *subnet)
 {
   struct GNUNET_HashCode hc;
   subnet->peers = GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
@@ -552,16 +506,17 @@ create_subnet_peers (struct GNUNET_CONFIGURATION_Handle 
*cfg,
   for (int i = 0; i < subnet->number_peers; i++)
   {
     struct GNUNET_ShortHashCode hkey;
-    struct GNUNET_TESTING_NetjailSubnetPeer *subnet_peer = GNUNET_new (struct 
GNUNET_TESTING_NetjailSubnetPeer);
+    struct GNUNET_TESTING_NetjailSubnetPeer *subnet_peer = GNUNET_new (struct
+                                                                       
GNUNET_TESTING_NetjailSubnetPeer);
 
     topology->total++;
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Subnet peers -> Number of nodes: %u\n",
          topology->total);
     GNUNET_CRYPTO_hash (&topology->total, sizeof(topology->total), &hc);
-      memcpy (&hkey,
-              &hc,
-              sizeof (hkey));
+    memcpy (&hkey,
+            &hc,
+            sizeof (hkey));
     GNUNET_CONTAINER_multishortmap_put (subnet->peers,
                                         &hkey,
                                         subnet_peer,
@@ -572,18 +527,19 @@ create_subnet_peers (struct GNUNET_CONFIGURATION_Handle 
*cfg,
 
 static void
 create_subnets (struct GNUNET_CONFIGURATION_Handle *cfg,
-               struct GNUNET_TESTING_NetjailTopology *topology,
-               struct GNUNET_TESTING_NetjailCarrier *carrier)
+                struct GNUNET_TESTING_NetjailTopology *topology,
+                struct GNUNET_TESTING_NetjailCarrier *carrier)
 {
   struct GNUNET_HashCode hc;
   carrier->subnets = GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
-  
+
   for (int i = 0; i < carrier->number_subnets; i++)
   {
     struct GNUNET_ShortHashCode hkey;
-    struct GNUNET_TESTING_NetjailSubnet *subnet = GNUNET_new (struct 
GNUNET_TESTING_NetjailSubnet);
+    struct GNUNET_TESTING_NetjailSubnet *subnet = GNUNET_new (struct
+                                                              
GNUNET_TESTING_NetjailSubnet);
     char *section;
- 
+
     topology->total++;
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Subnets -> Number of nodes: %u\n",
@@ -591,18 +547,20 @@ create_subnets (struct GNUNET_CONFIGURATION_Handle *cfg,
     subnet->number = topology->total;
     subnet->index = i;
     GNUNET_CRYPTO_hash (&topology->total, sizeof(topology->total), &hc);
-      memcpy (&hkey,
-              &hc,
-              sizeof (hkey));
+    memcpy (&hkey,
+            &hc,
+            sizeof (hkey));
     GNUNET_CONTAINER_multishortmap_put (carrier->subnets,
                                         &hkey,
                                         subnet,
                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
     GNUNET_asprintf (&section, "CARRIER-%u-SUBNET-%u", carrier->index, i);
     if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
-                                                          section,
-                                                          "SUBNET_PEERS",
-                                                          (unsigned long long 
*) &subnet->number_peers))
+                                                            section,
+                                                            "SUBNET_PEERS",
+                                                            (unsigned long
+                                                             long *) &subnet->
+                                                            number_peers))
     {
       subnet->number_peers = topology->default_subnet_peers;
     }
@@ -616,8 +574,8 @@ create_subnets (struct GNUNET_CONFIGURATION_Handle *cfg,
 
 static void
 create_peers (struct GNUNET_CONFIGURATION_Handle *cfg,
-               struct GNUNET_TESTING_NetjailTopology *topology,
-               struct GNUNET_TESTING_NetjailCarrier *carrier)
+              struct GNUNET_TESTING_NetjailTopology *topology,
+              struct GNUNET_TESTING_NetjailCarrier *carrier)
 {
   struct GNUNET_HashCode hc;
   carrier->peers = GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
@@ -625,7 +583,8 @@ create_peers (struct GNUNET_CONFIGURATION_Handle *cfg,
   for (int i = 0; i < carrier->number_peers; i++)
   {
     struct GNUNET_ShortHashCode hkey;
-    struct GNUNET_TESTING_NetjailCarrierPeer *peer = GNUNET_new (struct 
GNUNET_TESTING_NetjailCarrierPeer);
+    struct GNUNET_TESTING_NetjailCarrierPeer *peer = GNUNET_new (struct
+                                                                 
GNUNET_TESTING_NetjailCarrierPeer);
 
     topology->total++;
     LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -633,14 +592,14 @@ create_peers (struct GNUNET_CONFIGURATION_Handle *cfg,
          topology->total);
     peer->number = topology->total;
     GNUNET_CRYPTO_hash (&topology->total, sizeof(topology->total), &hc);
-      memcpy (&hkey,
-              &hc,
-              sizeof (hkey));
+    memcpy (&hkey,
+            &hc,
+            sizeof (hkey));
     GNUNET_CONTAINER_multishortmap_put (carrier->peers,
                                         &hkey,
                                         peer,
                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
-    //GNUNET_asprintf (&section, "CARRIER-%u-PEER-%u", carrier->index, i);
+    // GNUNET_asprintf (&section, "CARRIER-%u-PEER-%u", carrier->index, i);
   }
 }
 
@@ -649,8 +608,10 @@ struct GNUNET_TESTING_NetjailTopology *
 GNUNET_TESTING_get_topo_from_string_ (const char *input)
 {
   struct GNUNET_CONFIGURATION_Handle *cfg;
-  struct GNUNET_TESTING_NetjailTopology *topology = GNUNET_new (struct 
GNUNET_TESTING_NetjailTopology);
-  topology->backbone_peers = GNUNET_CONTAINER_multishortmap_create 
(1,GNUNET_NO);
+  struct GNUNET_TESTING_NetjailTopology *topology = GNUNET_new (struct
+                                                                
GNUNET_TESTING_NetjailTopology);
+  topology->backbone_peers = GNUNET_CONTAINER_multishortmap_create 
(1,GNUNET_NO)
+  ;
   topology->carriers = GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
   struct GNUNET_HashCode hc;
 
@@ -671,7 +632,8 @@ GNUNET_TESTING_get_topo_from_string_ (const char *input)
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
                                                           "DEFAULTS",
                                                           "SUBNETS",
-                                                          
&(topology->default_subnets)))
+                                                          &(topology->
+                                                            default_subnets)))
   {
     LOG (GNUNET_ERROR_TYPE_ERROR,
          "Missing default SUBNETS!\n");
@@ -689,7 +651,8 @@ GNUNET_TESTING_get_topo_from_string_ (const char *input)
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
                                                           "DEFAULTS",
                                                           "CARRIER_PEERS",
-                                                          
&(topology->default_carrier_peers)))
+                                                          &(topology->
+                                                            
default_carrier_peers)))
   {
     LOG (GNUNET_ERROR_TYPE_ERROR,
          "Missing default CARRIER_PEERS!\n");
@@ -698,7 +661,8 @@ GNUNET_TESTING_get_topo_from_string_ (const char *input)
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
                                                           "DEFAULTS",
                                                           "SUBNET_PEERS",
-                                                          
&(topology->default_subnet_peers)))
+                                                          &(topology->
+                                                            
default_subnet_peers)))
   {
     LOG (GNUNET_ERROR_TYPE_ERROR,
          "Missing default SUBNET_PEERS!\n");
@@ -707,7 +671,8 @@ GNUNET_TESTING_get_topo_from_string_ (const char *input)
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
                                                           "BACKBONE",
                                                           "CARRIERS",
-                                                          
&(topology->num_carriers)))
+                                                          &(topology->
+                                                            num_carriers)))
   {
     LOG (GNUNET_ERROR_TYPE_INFO,
          "No carrier configured!\n");
@@ -716,15 +681,18 @@ GNUNET_TESTING_get_topo_from_string_ (const char *input)
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
                                                           "BACKBONE",
                                                           "BACKBONE_PEERS",
-                                                          
&(topology->num_backbone_peers)))
+                                                          &(topology->
+                                                            
num_backbone_peers))
+      )
   {
     LOG (GNUNET_ERROR_TYPE_INFO,
          "No backbone peers configured!\n");
     return NULL;
   }
-  for (int i = 0;i < topology->num_backbone_peers; i++)
+  for (int i = 0; i < topology->num_backbone_peers; i++)
   {
-    struct GNUNET_TESTING_NetjailBackbonePeer *peer = GNUNET_new (struct 
GNUNET_TESTING_NetjailBackbonePeer);
+    struct GNUNET_TESTING_NetjailBackbonePeer *peer = GNUNET_new (struct
+                                                                  
GNUNET_TESTING_NetjailBackbonePeer);
     struct GNUNET_ShortHashCode hkey;
 
     topology->total++;
@@ -733,18 +701,19 @@ GNUNET_TESTING_get_topo_from_string_ (const char *input)
          topology->total);
     peer->number = topology->total;
     GNUNET_CRYPTO_hash (&topology->total, sizeof(topology->total), &hc);
-      memcpy (&hkey,
-              &hc,
-              sizeof (hkey));
+    memcpy (&hkey,
+            &hc,
+            sizeof (hkey));
     GNUNET_CONTAINER_multishortmap_put (topology->backbone_peers,
                                         &hkey,
                                         peer,
                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
   }
   GNUNET_assert (NULL != topology->carriers);
-  for (int i = 0;i < topology->num_carriers; i++)
+  for (int i = 0; i < topology->num_carriers; i++)
   {
-    struct GNUNET_TESTING_NetjailCarrier *carrier = GNUNET_new (struct 
GNUNET_TESTING_NetjailCarrier);
+    struct GNUNET_TESTING_NetjailCarrier *carrier = GNUNET_new (struct
+                                                                
GNUNET_TESTING_NetjailCarrier);
     struct GNUNET_ShortHashCode hkey;
     char *section;
 
@@ -755,36 +724,40 @@ GNUNET_TESTING_get_topo_from_string_ (const char *input)
     carrier->number = topology->total;
     GNUNET_CRYPTO_hash (&topology->total, sizeof(topology->total), &hc);
     memcpy (&hkey,
-              &hc,
-              sizeof (hkey));
+            &hc,
+            sizeof (hkey));
     GNUNET_assert (NULL != topology->carriers);
     GNUNET_CONTAINER_multishortmap_put (topology->carriers,
                                         &hkey,
                                         carrier,
                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
-    GNUNET_asprintf (&section, "CARRIER-%u", i); 
+    GNUNET_asprintf (&section, "CARRIER-%u", i);
     if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
-                                                          section,
-                                                          "SUBNETS",
-                                                          (unsigned long long 
*) &carrier->number_subnets))
+                                                            section,
+                                                            "SUBNETS",
+                                                            (unsigned long
+                                                             long *) &carrier->
+                                                            number_subnets))
     {
       carrier->number_subnets = topology->default_subnets;
       LOG (GNUNET_ERROR_TYPE_DEBUG,
-         "Carrier -> Default number of subnets: %u\n",
-         carrier->number_subnets);
+           "Carrier -> Default number of subnets: %u\n",
+           carrier->number_subnets);
     }
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Carrier -> number of subnets: %u\n",
          carrier->number_subnets);
     if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg,
-                                                          section,
-                                                          "CARRIER_PEERS",
-                                                          (unsigned long long 
*) &carrier->number_peers))
+                                                            section,
+                                                            "CARRIER_PEERS",
+                                                            (unsigned long
+                                                             long *) &carrier->
+                                                            number_peers))
     {
       carrier->number_peers = topology->default_carrier_peers;
       LOG (GNUNET_ERROR_TYPE_DEBUG,
-         "Carrier -> Default number of peers: %u\n",
-         carrier->number_peers);
+           "Carrier -> Default number of peers: %u\n",
+           carrier->number_peers);
     }
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Carrier -> Default number of peers: %u\n",
@@ -796,7 +769,7 @@ GNUNET_TESTING_get_topo_from_string_ (const char *input)
   }
 
   GNUNET_free (cfg);
-  
+
   return topology;
 }
 
diff --git a/src/lib/util/test_container_heap.c 
b/src/lib/util/test_container_heap.c
index f11070ed5..3ded4dec5 100644
--- a/src/lib/util/test_container_heap.c
+++ b/src/lib/util/test_container_heap.c
@@ -59,6 +59,19 @@ check ()
   struct GNUNET_CONTAINER_HeapNode *n7;
   struct GNUNET_CONTAINER_HeapNode *n8;
   const char *r;
+  char val11[] = "11";
+  char val10[] = "10";
+  char val20[] = "20";
+  char val30[] = "30";
+  char val40[] = "40";
+  char val50[] = "50";
+  char val60[] = "60";
+  char val70[] = "70";
+  char val80[] = "80";
+  char val100[] = "100";
+  char val78[] = "78";
+  char val15[] = "15";
+  char val30div200[] = "30/200";
 
   myHeap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
 
@@ -74,7 +87,7 @@ check ()
   n1 = GNUNET_CONTAINER_heap_walk_get_next (myHeap);
   GNUNET_assert (NULL == n1);
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "11", 11);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val11, 11);
   GNUNET_assert (NULL != n1);
 
 
@@ -90,24 +103,24 @@ check ()
 
   GNUNET_CONTAINER_heap_iterate (myHeap, &iterator_callback, NULL);
   GNUNET_assert (1 == GNUNET_CONTAINER_heap_get_size (myHeap));
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "78", 78);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val78, 78);
   GNUNET_assert (2 == GNUNET_CONTAINER_heap_get_size (myHeap));
   GNUNET_assert (0 == strcmp ("78", GNUNET_CONTAINER_heap_remove_node (n2)));
   GNUNET_assert (1 == GNUNET_CONTAINER_heap_get_size (myHeap));
   GNUNET_CONTAINER_heap_iterate (myHeap, &iterator_callback, NULL);
 
-  n3 = GNUNET_CONTAINER_heap_insert (myHeap, "15", 5);
+  n3 = GNUNET_CONTAINER_heap_insert (myHeap, val15, 5);
   GNUNET_CONTAINER_heap_update_cost (n3, 15);
   GNUNET_assert (2 == GNUNET_CONTAINER_heap_get_size (myHeap));
   GNUNET_CONTAINER_heap_iterate (myHeap, &iterator_callback, NULL);
 
-  n4 = GNUNET_CONTAINER_heap_insert (myHeap, "50", 50);
+  n4 = GNUNET_CONTAINER_heap_insert (myHeap, val50, 50);
   GNUNET_CONTAINER_heap_update_cost (n4, 50);
   GNUNET_assert (3 == GNUNET_CONTAINER_heap_get_size (myHeap));
   GNUNET_CONTAINER_heap_iterate (myHeap, &iterator_callback, NULL);
 
-  n5 = GNUNET_CONTAINER_heap_insert (myHeap, "100", 100);
-  n6 = GNUNET_CONTAINER_heap_insert (myHeap, "30/200", 30);
+  n5 = GNUNET_CONTAINER_heap_insert (myHeap, val100, 100);
+  n6 = GNUNET_CONTAINER_heap_insert (myHeap, val30div200, 30);
   GNUNET_assert (5 == GNUNET_CONTAINER_heap_get_size (myHeap));
   GNUNET_CONTAINER_heap_remove_node (n5);
   r = GNUNET_CONTAINER_heap_remove_root (myHeap);        /* n1 */
@@ -131,15 +144,15 @@ check ()
 
   myHeap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
   GNUNET_CONTAINER_heap_update_cost (n1, 15);
 
   r = GNUNET_CONTAINER_heap_remove_node (n1);
   GNUNET_assert (NULL != r);
   GNUNET_assert (0 == strcmp ("10", r));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 10);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 10);
 
   GNUNET_CONTAINER_heap_walk_get_next (myHeap);
   r = GNUNET_CONTAINER_heap_remove_node (n2);
@@ -149,9 +162,9 @@ check ()
   GNUNET_assert (NULL != r);
   GNUNET_assert (0 == strcmp ("10", r));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 10);
-  n3 = GNUNET_CONTAINER_heap_insert (myHeap, "30", 10);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 10);
+  n3 = GNUNET_CONTAINER_heap_insert (myHeap, val30, 10);
 
   GNUNET_CONTAINER_heap_remove_node (n2);
   GNUNET_CONTAINER_heap_remove_node (n1);
@@ -159,9 +172,9 @@ check ()
   GNUNET_assert (NULL != r);
   GNUNET_assert (0 == strcmp ("30", r));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 10);
-  n3 = GNUNET_CONTAINER_heap_insert (myHeap, "30", 10);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 10);
+  n3 = GNUNET_CONTAINER_heap_insert (myHeap, val30, 10);
 
   GNUNET_CONTAINER_heap_remove_node (n2);
   GNUNET_CONTAINER_heap_remove_node (n1);
@@ -169,9 +182,9 @@ check ()
   GNUNET_assert (NULL != r);
   GNUNET_assert (0 == strcmp ("30", r));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 20);
-  n3 = GNUNET_CONTAINER_heap_insert (myHeap, "30", 30);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 20);
+  n3 = GNUNET_CONTAINER_heap_insert (myHeap, val30, 30);
 
   GNUNET_assert (0 == nstrcmp ("20", GNUNET_CONTAINER_heap_remove_node (n2)));
   GNUNET_assert (0 ==
@@ -179,16 +192,16 @@ check ()
   GNUNET_assert (0 ==
                  nstrcmp ("30", GNUNET_CONTAINER_heap_remove_root (myHeap)));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 20);
-  n3 = GNUNET_CONTAINER_heap_insert (myHeap, "30", 30);
-  n4 = GNUNET_CONTAINER_heap_insert (myHeap, "40", 40);
-  n5 = GNUNET_CONTAINER_heap_insert (myHeap, "50", 50);
-  n6 = GNUNET_CONTAINER_heap_insert (myHeap, "60", 60);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 20);
+  n3 = GNUNET_CONTAINER_heap_insert (myHeap, val30, 30);
+  n4 = GNUNET_CONTAINER_heap_insert (myHeap, val40, 40);
+  n5 = GNUNET_CONTAINER_heap_insert (myHeap, val50, 50);
+  n6 = GNUNET_CONTAINER_heap_insert (myHeap, val60, 60);
 
   // Inserting nodes deeper in the tree with lower costs
-  n7 = GNUNET_CONTAINER_heap_insert (myHeap, "70", 10);
-  n8 = GNUNET_CONTAINER_heap_insert (myHeap, "80", 10);
+  n7 = GNUNET_CONTAINER_heap_insert (myHeap, val70, 10);
+  n8 = GNUNET_CONTAINER_heap_insert (myHeap, val80, 10);
 
   GNUNET_assert (0 == nstrcmp ("30", GNUNET_CONTAINER_heap_remove_node (n3)));
 
@@ -216,45 +229,45 @@ check ()
 
   myHeap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MAX);
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
   GNUNET_CONTAINER_heap_update_cost (n1, 15);
 
   GNUNET_assert (0 == nstrcmp ("10", GNUNET_CONTAINER_heap_remove_node (n1)));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 10);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 10);
 
   GNUNET_CONTAINER_heap_walk_get_next (myHeap);
   GNUNET_assert (0 == nstrcmp ("20", GNUNET_CONTAINER_heap_remove_node (n2)));
   GNUNET_assert (0 == nstrcmp ("10", GNUNET_CONTAINER_heap_remove_node (n1)));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 10);
-  n3 = GNUNET_CONTAINER_heap_insert (myHeap, "30", 10);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 10);
+  n3 = GNUNET_CONTAINER_heap_insert (myHeap, val30, 10);
 
   GNUNET_CONTAINER_heap_remove_node (n2);
   GNUNET_CONTAINER_heap_remove_node (n1);
   GNUNET_assert (0 ==
                  nstrcmp ("30", GNUNET_CONTAINER_heap_remove_root (myHeap)));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 10);
-  n3 = GNUNET_CONTAINER_heap_insert (myHeap, "30", 10);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 10);
+  n3 = GNUNET_CONTAINER_heap_insert (myHeap, val30, 10);
 
   GNUNET_CONTAINER_heap_remove_node (n2);
   GNUNET_CONTAINER_heap_remove_node (n1);
   GNUNET_assert (0 == nstrcmp ("30", GNUNET_CONTAINER_heap_remove_node (n3)));
 
-  n1 = GNUNET_CONTAINER_heap_insert (myHeap, "10", 10);
-  n2 = GNUNET_CONTAINER_heap_insert (myHeap, "20", 20);
-  n3 = GNUNET_CONTAINER_heap_insert (myHeap, "30", 30);
-  n4 = GNUNET_CONTAINER_heap_insert (myHeap, "40", 40);
-  n5 = GNUNET_CONTAINER_heap_insert (myHeap, "50", 50);
-  n6 = GNUNET_CONTAINER_heap_insert (myHeap, "60", 60);
+  n1 = GNUNET_CONTAINER_heap_insert (myHeap, val10, 10);
+  n2 = GNUNET_CONTAINER_heap_insert (myHeap, val20, 20);
+  n3 = GNUNET_CONTAINER_heap_insert (myHeap, val30, 30);
+  n4 = GNUNET_CONTAINER_heap_insert (myHeap, val40, 40);
+  n5 = GNUNET_CONTAINER_heap_insert (myHeap, val50, 50);
+  n6 = GNUNET_CONTAINER_heap_insert (myHeap, val60, 60);
 
   // Inserting nodes deeper in the tree with lower costs
-  n7 = GNUNET_CONTAINER_heap_insert (myHeap, "70", 10);
-  n8 = GNUNET_CONTAINER_heap_insert (myHeap, "80", 10);
+  n7 = GNUNET_CONTAINER_heap_insert (myHeap, val70, 10);
+  n8 = GNUNET_CONTAINER_heap_insert (myHeap, val80, 10);
 
   GNUNET_assert (0 == nstrcmp ("30", GNUNET_CONTAINER_heap_remove_node (n3)));
 
diff --git a/src/lib/util/test_container_multipeermap.c 
b/src/lib/util/test_container_multipeermap.c
index 6639b05ea..1130d9de1 100644
--- a/src/lib/util/test_container_multipeermap.c
+++ b/src/lib/util/test_container_multipeermap.c
@@ -45,6 +45,9 @@ testMap (int i)
   struct GNUNET_CONTAINER_MultiPeerMapIterator *iter = NULL;
   struct GNUNET_PeerIdentity key_ret;
   const char *ret;
+  char v1[] = "v1";
+  char v2[] = "v2";
+  char v3[] = "v3";
   int j;
 
   CHECK (NULL != (m = GNUNET_CONTAINER_multipeermap_create (i, GNUNET_NO)));
@@ -62,24 +65,24 @@ testMap (int i)
   CHECK (0 == GNUNET_CONTAINER_multipeermap_get_multiple (m, &k1, NULL, NULL));
 
   CHECK (GNUNET_OK ==
-         GNUNET_CONTAINER_multipeermap_put (m, &k1, "v1",
+         GNUNET_CONTAINER_multipeermap_put (m, &k1, v1,
                                             
GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE));
   CHECK (1 == GNUNET_CONTAINER_multipeermap_size (m));
   ret = GNUNET_CONTAINER_multipeermap_get (m, &k1);
   GNUNET_assert (ret != NULL);
   CHECK (0 == strcmp ("v1", ret));
   CHECK (GNUNET_NO ==
-         GNUNET_CONTAINER_multipeermap_put (m, &k1, "v1",
+         GNUNET_CONTAINER_multipeermap_put (m, &k1, v1,
                                             
GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE));
   CHECK (1 == GNUNET_CONTAINER_multipeermap_size (m));
   CHECK (GNUNET_OK ==
-         GNUNET_CONTAINER_multipeermap_put (m, &k1, "v2",
+         GNUNET_CONTAINER_multipeermap_put (m, &k1, v2,
                                             
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
   CHECK (GNUNET_OK ==
-         GNUNET_CONTAINER_multipeermap_put (m, &k1, "v3",
+         GNUNET_CONTAINER_multipeermap_put (m, &k1, v3,
                                             
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
   CHECK (3 == GNUNET_CONTAINER_multipeermap_size (m));
-  CHECK (GNUNET_OK == GNUNET_CONTAINER_multipeermap_remove (m, &k1, "v3"));
+  CHECK (GNUNET_OK == GNUNET_CONTAINER_multipeermap_remove (m, &k1, v3));
   CHECK (2 == GNUNET_CONTAINER_multipeermap_size (m));
   CHECK (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (m, &k1));
   CHECK (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (m, &k2));
@@ -106,7 +109,7 @@ testMap (int i)
   CHECK (2 == GNUNET_CONTAINER_multipeermap_remove_all (m, &k1));
   for (j = 0; j < 1024; j++)
     CHECK (GNUNET_OK ==
-           GNUNET_CONTAINER_multipeermap_put (m, &k1, "v2",
+           GNUNET_CONTAINER_multipeermap_put (m, &k1, v2,
                                               
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
   iter = GNUNET_CONTAINER_multipeermap_iterator_create (m);
   for (j = 0; j < GNUNET_CONTAINER_multipeermap_size (m); j++)
diff --git a/src/service/fs/fs_api.c b/src/service/fs/fs_api.c
index 65646c7eb..1e9da3fd2 100644
--- a/src/service/fs/fs_api.c
+++ b/src/service/fs/fs_api.c
@@ -1462,27 +1462,29 @@ GNUNET_FS_file_information_sync_ (struct 
GNUNET_FS_FileInformation *fi)
     if ((NULL != fi->data.dir.entries) &&
         (NULL == fi->data.dir.entries->serialization))
       GNUNET_FS_file_information_sync_ (fi->data.dir.entries);
-    struct GNUNET_BIO_WriteSpec ws[] = {
-      GNUNET_BIO_write_spec_int32 ("dir size",
-                                   (int32_t *) &fi->data.dir.dir_size),
-      GNUNET_BIO_write_spec_int64 (
-        "contents completed",
-        (int64_t *) &fi->data.dir.contents_completed),
-      GNUNET_BIO_write_spec_int64 ("contents size",
-                                   (int64_t *) &fi->data.dir.contents_size),
-      GNUNET_BIO_write_spec_object ("dir data",
-                                    fi->data.dir.dir_data,
-                                    (uint32_t) fi->data.dir.dir_size),
-      GNUNET_BIO_write_spec_string ("dir entries",
-                                    (fi->data.dir.entries == NULL)
+    {
+      struct GNUNET_BIO_WriteSpec ws[] = {
+        GNUNET_BIO_write_spec_int32 ("dir size",
+                                     (int32_t *) &fi->data.dir.dir_size),
+        GNUNET_BIO_write_spec_int64 (
+          "contents completed",
+          (int64_t *) &fi->data.dir.contents_completed),
+        GNUNET_BIO_write_spec_int64 ("contents size",
+                                     (int64_t *) &fi->data.dir.contents_size),
+        GNUNET_BIO_write_spec_object ("dir data",
+                                      fi->data.dir.dir_data,
+                                      (uint32_t) fi->data.dir.dir_size),
+        GNUNET_BIO_write_spec_string ("dir entries",
+                                      (fi->data.dir.entries == NULL)
                                     ? NULL
                                     : fi->data.dir.entries->serialization),
-      GNUNET_BIO_write_spec_end (),
-    };
-    if ((GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)))
-    {
-      GNUNET_break (0);
-      goto cleanup;
+        GNUNET_BIO_write_spec_end (),
+      };
+      if ((GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)))
+      {
+        GNUNET_break (0);
+        goto cleanup;
+      }
     }
     break;
 
@@ -1633,22 +1635,24 @@ deserialize_publish_file (void *cls, const char 
*filename)
     GNUNET_break (0);
     goto cleanup;
   }
-  struct GNUNET_BIO_ReadSpec rs[] = {
-    GNUNET_BIO_read_spec_string ("publish-nid", &pc->nid, 1024),
-    GNUNET_BIO_read_spec_string ("publish-nuid", &pc->nuid, 1024),
-    GNUNET_BIO_read_spec_int32 ("options", &options),
-    GNUNET_BIO_read_spec_int32 ("all done", &all_done),
-    GNUNET_BIO_read_spec_int32 ("have ns", &have_ns),
-    GNUNET_BIO_read_spec_string ("publish-firoot", &fi_root, 128),
-    GNUNET_BIO_read_spec_string ("publish-fipos", &fi_pos, 128),
-    GNUNET_BIO_read_spec_end (),
-  };
-  if ((GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs)) ||
-      ((GNUNET_YES == have_ns) &&
-       (GNUNET_OK != GNUNET_BIO_read (rh, "publish-ns", &ns, sizeof(ns)))))
   {
-    GNUNET_break (0);
-    goto cleanup;
+    struct GNUNET_BIO_ReadSpec rs[] = {
+      GNUNET_BIO_read_spec_string ("publish-nid", &pc->nid, 1024),
+      GNUNET_BIO_read_spec_string ("publish-nuid", &pc->nuid, 1024),
+      GNUNET_BIO_read_spec_int32 ("options", &options),
+      GNUNET_BIO_read_spec_int32 ("all done", &all_done),
+      GNUNET_BIO_read_spec_int32 ("have ns", &have_ns),
+      GNUNET_BIO_read_spec_string ("publish-firoot", &fi_root, 128),
+      GNUNET_BIO_read_spec_string ("publish-fipos", &fi_pos, 128),
+      GNUNET_BIO_read_spec_end (),
+    };
+    if ((GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs)) ||
+        ((GNUNET_YES == have_ns) &&
+         (GNUNET_OK != GNUNET_BIO_read (rh, "publish-ns", &ns, sizeof(ns)))))
+    {
+      GNUNET_break (0);
+      goto cleanup;
+    }
   }
   pc->options = options;
   pc->all_done = all_done;
@@ -1770,28 +1774,30 @@ GNUNET_FS_publish_sync_ (struct 
GNUNET_FS_PublishContext *pc)
     goto cleanup;
   }
   have_ns = (NULL != pc->ns) ? GNUNET_YES : GNUNET_NO;
-  struct GNUNET_BIO_WriteSpec ws[] = {
-    GNUNET_BIO_write_spec_string ("nid", pc->nid),
-    GNUNET_BIO_write_spec_string ("nuid", pc->nuid),
-    GNUNET_BIO_write_spec_int32 ("options", (int32_t *) &pc->options),
-    GNUNET_BIO_write_spec_int32 ("all done", &pc->all_done),
-    GNUNET_BIO_write_spec_int32 ("have ns", &have_ns),
-    GNUNET_BIO_write_spec_string ("serialization", pc->fi->serialization),
-    GNUNET_BIO_write_spec_string ("pos serialization", (NULL == pc->fi_pos)
+  {
+    struct GNUNET_BIO_WriteSpec ws[] = {
+      GNUNET_BIO_write_spec_string ("nid", pc->nid),
+      GNUNET_BIO_write_spec_string ("nuid", pc->nuid),
+      GNUNET_BIO_write_spec_int32 ("options", (int32_t *) &pc->options),
+      GNUNET_BIO_write_spec_int32 ("all done", &pc->all_done),
+      GNUNET_BIO_write_spec_int32 ("have ns", &have_ns),
+      GNUNET_BIO_write_spec_string ("serialization", pc->fi->serialization),
+      GNUNET_BIO_write_spec_string ("pos serialization", (NULL == pc->fi_pos)
                                   ? NULL
                                   : pc->fi_pos->serialization),
-    GNUNET_BIO_read_spec_end ()
-  };
-  if ((GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)) ||
-      ((NULL != pc->ns) &&
-       (GNUNET_OK !=
-        GNUNET_BIO_write (wh,
-                          "ns",
-                          pc->ns,
-                          sizeof(struct GNUNET_CRYPTO_EcdsaPrivateKey)))))
-  {
-    GNUNET_break (0);
-    goto cleanup;
+      GNUNET_BIO_read_spec_end ()
+    };
+    if ((GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)) ||
+        ((NULL != pc->ns) &&
+         (GNUNET_OK !=
+          GNUNET_BIO_write (wh,
+                            "ns",
+                            pc->ns,
+                            sizeof(struct GNUNET_CRYPTO_EcdsaPrivateKey)))))
+    {
+      GNUNET_break (0);
+      goto cleanup;
+    }
   }
   if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL))
   {
@@ -1842,32 +1848,34 @@ GNUNET_FS_unindex_sync_ (struct 
GNUNET_FS_UnindexContext *uc)
     uris = GNUNET_FS_uri_to_string (uc->ksk_uri);
   else
     uris = NULL;
-  struct GNUNET_BIO_WriteSpec ws1[] = {
-    GNUNET_BIO_write_spec_string ("filename", uc->filename),
-    GNUNET_BIO_write_spec_int64 ("file size", (int64_t *) &uc->file_size),
-    GNUNET_BIO_write_spec_end (),
-  };
-  struct GNUNET_BIO_WriteSpec ws2[] = {
-    GNUNET_BIO_write_spec_int32 ("state", (int32_t *) &uc->state),
-    GNUNET_BIO_write_spec_object ("hashkey", &uc->chk,
-                                  sizeof (struct ContentHashKey)),
-    GNUNET_BIO_write_spec_string ("uris", uris),
-    GNUNET_BIO_write_spec_int32 ("ksk offset", (int32_t *) &uc->ksk_offset),
-    GNUNET_BIO_write_spec_end (),
-  };
-  if ((GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws1)) ||
-      (GNUNET_OK != write_start_time (wh, uc->start_time)) ||
-      (GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws2)) ||
-      ((uc->state == UNINDEX_STATE_FS_NOTIFY) &&
-       (GNUNET_OK != GNUNET_BIO_write (wh,
-                                       "file id",
-                                       &uc->file_id,
-                                       sizeof(struct GNUNET_HashCode)))) ||
-      ((uc->state == UNINDEX_STATE_ERROR) &&
-       (GNUNET_OK != GNUNET_BIO_write_string (wh, "emsg", uc->emsg))))
   {
-    GNUNET_break (0);
-    goto cleanup;
+    struct GNUNET_BIO_WriteSpec ws1[] = {
+      GNUNET_BIO_write_spec_string ("filename", uc->filename),
+      GNUNET_BIO_write_spec_int64 ("file size", (int64_t *) &uc->file_size),
+      GNUNET_BIO_write_spec_end (),
+    };
+    struct GNUNET_BIO_WriteSpec ws2[] = {
+      GNUNET_BIO_write_spec_int32 ("state", (int32_t *) &uc->state),
+      GNUNET_BIO_write_spec_object ("hashkey", &uc->chk,
+                                    sizeof (struct ContentHashKey)),
+      GNUNET_BIO_write_spec_string ("uris", uris),
+      GNUNET_BIO_write_spec_int32 ("ksk offset", (int32_t *) &uc->ksk_offset),
+      GNUNET_BIO_write_spec_end (),
+    };
+    if ((GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws1)) ||
+        (GNUNET_OK != write_start_time (wh, uc->start_time)) ||
+        (GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws2)) ||
+        ((uc->state == UNINDEX_STATE_FS_NOTIFY) &&
+         (GNUNET_OK != GNUNET_BIO_write (wh,
+                                         "file id",
+                                         &uc->file_id,
+                                         sizeof(struct GNUNET_HashCode)))) ||
+        ((uc->state == UNINDEX_STATE_ERROR) &&
+         (GNUNET_OK != GNUNET_BIO_write_string (wh, "emsg", uc->emsg))))
+    {
+      GNUNET_break (0);
+      goto cleanup;
+    }
   }
   if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL))
   {
@@ -2175,33 +2183,35 @@ GNUNET_FS_search_result_sync_ (struct 
GNUNET_FS_SearchResult *sr)
     goto cleanup;
   }
   uris = GNUNET_FS_uri_to_string (sr->uri);
-  struct GNUNET_BIO_WriteSpec ws[] = {
-    GNUNET_BIO_write_spec_string ("uris", uris),
-    GNUNET_BIO_write_spec_string ("download serialization",
-                                  (sr->download != NULL)
+  {
+    struct GNUNET_BIO_WriteSpec ws[] = {
+      GNUNET_BIO_write_spec_string ("uris", uris),
+      GNUNET_BIO_write_spec_string ("download serialization",
+                                    (sr->download != NULL)
                                   ? sr->download->serialization
                                   : NULL),
-    GNUNET_BIO_write_spec_string ("update search serialization",
-                                  (sr->update_search != NULL)
+      GNUNET_BIO_write_spec_string ("update search serialization",
+                                    (sr->update_search != NULL)
                                   ? sr->update_search->serialization
                                   : NULL),
-    GNUNET_FS_write_spec_meta_data ("metadata", sr->meta),
-    GNUNET_BIO_write_spec_object ("key", &sr->key,
-                                  sizeof(struct GNUNET_HashCode)),
-    GNUNET_BIO_write_spec_int32 ("mandatory missing",
-                                 (int32_t *) &sr->mandatory_missing),
-    GNUNET_BIO_write_spec_int32 ("optional support",
-                                 (int32_t *) &sr->optional_support),
-    GNUNET_BIO_write_spec_int32 ("availability success",
-                                 (int32_t *) &sr->availability_success),
-    GNUNET_BIO_write_spec_int32 ("availability trials",
-                                 (int32_t *) &sr->availability_trials),
-    GNUNET_BIO_write_spec_end (),
-  };
-  if ((GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)))
-  {
-    GNUNET_break (0);
-    goto cleanup;
+      GNUNET_FS_write_spec_meta_data ("metadata", sr->meta),
+      GNUNET_BIO_write_spec_object ("key", &sr->key,
+                                    sizeof(struct GNUNET_HashCode)),
+      GNUNET_BIO_write_spec_int32 ("mandatory missing",
+                                   (int32_t *) &sr->mandatory_missing),
+      GNUNET_BIO_write_spec_int32 ("optional support",
+                                   (int32_t *) &sr->optional_support),
+      GNUNET_BIO_write_spec_int32 ("availability success",
+                                   (int32_t *) &sr->availability_success),
+      GNUNET_BIO_write_spec_int32 ("availability trials",
+                                   (int32_t *) &sr->availability_trials),
+      GNUNET_BIO_write_spec_end (),
+    };
+    if ((GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)))
+    {
+      GNUNET_break (0);
+      goto cleanup;
+    }
   }
   if ((NULL != sr->uri) && (GNUNET_FS_URI_KSK == sr->sc->uri->type) &&
       (GNUNET_OK !=
diff --git a/src/service/reclaim/did_helper.c b/src/service/reclaim/did_helper.c
index 193ac3fcf..31143adbb 100644
--- a/src/service/reclaim/did_helper.c
+++ b/src/service/reclaim/did_helper.c
@@ -94,15 +94,6 @@ DID_did_to_pkey (const char *did, struct 
GNUNET_CRYPTO_PublicKey *pkey)
   return GNUNET_OK;
 }
 
-/**
- * @brief Convert a base 64 encoded public key to a GNUNET key
- */
-static struct GNUNET_CRYPTO_PublicKey *
-GNUNET_DID_key_convert_multibase_base64_to_gnunet (char *pkey_str)
-{
-  return NULL;
-}
-
 /**
  * @brief Convert GNUNET key to a base 64 encoded public key
  */
diff --git a/src/service/reclaim/did_helper.h b/src/service/reclaim/did_helper.h
index d61992c68..df0f2fe55 100644
--- a/src/service/reclaim/did_helper.h
+++ b/src/service/reclaim/did_helper.h
@@ -48,12 +48,6 @@ DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego);
 enum GNUNET_GenericReturnValue
 DID_did_to_pkey (const char *did, struct GNUNET_CRYPTO_PublicKey *pkey);
 
-// /**
-//  * @brief Convert a base 64 encoded public key to a GNUNET key
-//  */
-// struct GNUNET_CRYPTO_PublicKey *
-// GNUNET_DID_key_convert_multibase_base64_to_gnunet(char *);
-
 /**
  * @brief Convert GNUNET key to a base 64 encoded public key
  */
diff --git a/src/service/reclaim/test_did_helper.c 
b/src/service/reclaim/test_did_helper.c
index aaf5a133d..346b75558 100644
--- a/src/service/reclaim/test_did_helper.c
+++ b/src/service/reclaim/test_did_helper.c
@@ -63,7 +63,7 @@ static struct GNUNET_CRYPTO_PublicKey test_pkey;
 static struct json_t *test_did_document;
 static char *test_did_document_str;
 
-void
+static void
 test_GNUNET_DID_pkey_to_did ()
 {
   char *str_did;
@@ -72,7 +72,7 @@ test_GNUNET_DID_pkey_to_did ()
   GNUNET_free (str_did);
 }
 
-void
+static void
 test_GNUNET_DID_did_to_pkey ()
 {
   struct GNUNET_CRYPTO_PublicKey pkey;
@@ -84,10 +84,7 @@ test_GNUNET_DID_did_to_pkey ()
                          sizeof (test_pkey.eddsa_key)) == 0);
 }
 
-// void
-// test_GNUNET_DID_key_convert_multibase_base64_to_gnunet ();
-
-void
+static void
 test_GNUNET_DID_key_convert_gnunet_to_multibase_base64 ()
 {
   char *multibase_key;
@@ -97,7 +94,7 @@ test_GNUNET_DID_key_convert_gnunet_to_multibase_base64 ()
   GNUNET_free (multibase_key);
 }
 
-void
+static void
 test_GNUNET_DID_pkey_to_did_document ()
 {
   struct json_t *did_document;
diff --git a/src/service/transport/transport_api2_communication.c 
b/src/service/transport/transport_api2_communication.c
index 8498fbcce..6ea6bce1a 100644
--- a/src/service/transport/transport_api2_communication.c
+++ b/src/service/transport/transport_api2_communication.c
@@ -784,12 +784,12 @@ check_start_burst (void *cls,
                    const struct GNUNET_TRANSPORT_StartBurst *sb)
 {
   (void) cls;
-  const char *str = (const char *) &sb[1];
+  const char *addr_str = (const char *) &sb[1];
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "check_start_burst %s %lu\n",
-              str,
-              strlen (str));
+              addr_str,
+              strlen (addr_str));
   GNUNET_MQ_check_zero_termination (sb);
   return GNUNET_OK;
 }
diff --git a/src/service/transport/transport_api2_core.c 
b/src/service/transport/transport_api2_core.c
index 446339cb5..752e9a0a2 100644
--- a/src/service/transport/transport_api2_core.c
+++ b/src/service/transport/transport_api2_core.c
@@ -336,9 +336,11 @@ mq_send_impl (struct GNUNET_MQ_Handle *mq,
   n->env_size = ntohs (msg->size);
   {
     struct GNUNET_MQ_Envelope *env;
+    enum GNUNET_MQ_PriorityPreferences prio;
 
     env = GNUNET_MQ_get_current_envelope (mq);
-    obm->priority = htonl ((uint32_t) GNUNET_MQ_env_get_options (env));
+    prio = GNUNET_MQ_env_get_options (env);
+    obm->priority = htonl ((uint32_t) prio);
   }
   obm->peer = n->id;
   if (0 == n->ready_window)

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