Browse Source

fix some compiler warnings

Schanzenbach, Martin 5 years ago
parent
commit
2a461dcb1f

+ 3 - 2
src/gns/gnunet-gns-proxy.c

@@ -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);

+ 1 - 1
src/namecache/plugin_namecache_flat.c

@@ -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,

+ 2 - 2
src/peerstore/plugin_peerstore_flat.c

@@ -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))