Browse Source

fix warnings

Christian Grothoff 4 years ago
parent
commit
c5a41c2269
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/gns/gnunet-service-gns_resolver.c
  2. 1 1
      src/gns/plugin_gnsrecord_gns.c

+ 1 - 1
src/gns/gnunet-service-gns_resolver.c

@@ -1747,7 +1747,7 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh,
     n = GNUNET_DNSPARSER_parse_name (rd[i].data,
                                      rd[i].data_size,
                                      &off);
-    ip = GNUNET_strdup (&rd[i].data[off]);
+    ip = GNUNET_strdup (&((const char *) rd[i].data)[off]);
     off += strlen (ip) + 1;
 
     if ((NULL == n) ||

+ 1 - 1
src/gns/plugin_gnsrecord_gns.c

@@ -79,7 +79,7 @@ gns_value_to_string (void *cls,
         return NULL;
       }
       /* DNS server IP/name must be UTF-8 */
-      ip = GNUNET_strdup ((char*) &data[off]);
+      ip = GNUNET_strdup (&((const char*) data)[off]);
       GNUNET_asprintf (&nstr, "%s@%s", ns, ip);
       GNUNET_free_non_null (ns);
       GNUNET_free_non_null (ip);