fix some compiler warnings
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Fri, 15 Feb 2019 20:16:37 +0000 (21:16 +0100)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Fri, 15 Feb 2019 20:16:37 +0000 (21:16 +0100)
src/gns/gnunet-gns-proxy.c
src/namecache/plugin_namecache_flat.c
src/peerstore/plugin_peerstore_flat.c

index 21451651d5a40845218180cfa4f336d56c50d700..9db388e771597afeaf3ca7435a3b2efb61ae82a7 100644 (file)
@@ -2045,11 +2045,12 @@ create_response (void *cls,
         const char *us;
         long upload_size;
 
+        upload_size = 0;
         us = MHD_lookup_connection_value (con,
                                           MHD_HEADER_KIND,
                                           MHD_HTTP_HEADER_CONTENT_LENGTH);
         if ( (NULL != us) &&
-            (1 == sscanf (us,
+                    (1 == sscanf (us,
                            "%ld",
                            &upload_size)) &&
              (upload_size >= 0) )
@@ -2149,7 +2150,7 @@ create_response (void *cls,
       curl_easy_setopt (s5r->curl,
                         CURLOPT_USE_SSL,
                         CURLUSESSL_ALL);
-      if (NULL != s5r->dane_data)
+      if (0 < s5r->num_danes)
         curl_easy_setopt (s5r->curl,
                           CURLOPT_SSL_VERIFYPEER,
                           0L);
index 4323780d5096372bc88569a17b14ec4a41c0592b..c093cb2a956e903a550ba1db77080526278dfc92 100644 (file)
@@ -173,7 +173,7 @@ database_setup (struct Plugin *plugin)
                                         &entry->query));
       GNUNET_STRINGS_base64_decode (block,
                                     strlen (block),
-                                    &block_buffer);
+                                    (void**)&block_buffer);
       entry->block = (struct GNUNET_GNSRECORD_Block *) block_buffer;
       if (GNUNET_OK !=
           GNUNET_CONTAINER_multihashmap_put (plugin->hm,
index cd1837e1a0e87e1b9fcf1c836732ce3396870ffe..0cd2522ecd67bc0629716db25b41235680b527c1 100644 (file)
@@ -440,7 +440,7 @@ database_setup (struct Plugin *plugin)
         o = NULL;
         s = GNUNET_STRINGS_base64_decode (peer,
                                           strlen (peer),
-                                          &o);
+                                          (void**)&o);
         if (sizeof (struct GNUNET_PeerIdentity) == s)
           GNUNET_memcpy (&entry->peer,
                          o,
@@ -451,7 +451,7 @@ database_setup (struct Plugin *plugin)
       }
       entry->value_size = GNUNET_STRINGS_base64_decode (value,
                                                         strlen (value),
-                                                        (char**)&entry->value);
+                                                        (void**)&entry->value);
       if (GNUNET_SYSERR ==
           GNUNET_STRINGS_fancy_time_to_absolute (expiry,
                                                  &entry->expiry))