fix warnings
authorChristian Grothoff <christian@grothoff.org>
Sat, 7 Dec 2019 15:32:57 +0000 (16:32 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sat, 7 Dec 2019 15:32:57 +0000 (16:32 +0100)
src/gns/gnunet-service-gns_resolver.c
src/gns/plugin_gnsrecord_gns.c

index dac0ab16a5c63cd560335b376b6329370b3cce5a..97a51cd7e9f9d8ad5ed60b260be739282ab4b9d1 100644 (file)
@@ -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) ||
index 871fc93245b35e9d33d68e3b7dc254b9e31061a1..370bf1da4e5860e50a6df361f1114c91e0f81099 100644 (file)
@@ -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);