gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 01/03: GNS: fix compiler warnings


From: gnunet
Subject: [gnunet] 01/03: GNS: fix compiler warnings
Date: Wed, 20 Dec 2023 15:07:22 +0100

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

sebi pushed a commit to branch master
in repository gnunet.

commit 18b6de72782e29ba367467d71560a2d1089fc2fc
Author: Sebastian Nadler <sebastian.nadler@tum.de>
AuthorDate: Tue Dec 19 16:53:46 2023 +0100

    GNS: fix compiler warnings
---
 src/lib/util/dnsparser.c              | 5 ++---
 src/plugin/gns/plugin_gnsrecord_gns.c | 1 -
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lib/util/dnsparser.c b/src/lib/util/dnsparser.c
index 1f51eacdc..93b2b590b 100644
--- a/src/lib/util/dnsparser.c
+++ b/src/lib/util/dnsparser.c
@@ -552,8 +552,8 @@ GNUNET_DNSPARSER_parse_uri (const char *udp_payload,
   uri = GNUNET_new (struct GNUNET_DNSPARSER_UriRecord);
   uri->priority = ntohs (uri_bin.prio);
   uri->weight = ntohs (uri_bin.weight);
-  int len =  GNUNET_asprintf (&(uri->target), "%.*s", udp_payload_length
-                              - sizeof(struct GNUNET_TUN_DnsUriRecord),
+  int max_len = udp_payload_length - sizeof(struct GNUNET_TUN_DnsUriRecord);
+  int len =  GNUNET_asprintf (&(uri->target), "%.*s", max_len,
                               &udp_payload[*off]);
   (*off) += len;
   if (NULL == uri->target)
@@ -1252,7 +1252,6 @@ GNUNET_DNSPARSER_builder_add_uri (char *dst,
                                   const struct GNUNET_DNSPARSER_UriRecord *uri)
 {
   struct GNUNET_TUN_DnsUriRecord sd;
-  int ret;
 
   if (*off + sizeof(struct GNUNET_TUN_DnsUriRecord) > dst_len)
     return GNUNET_NO;
diff --git a/src/plugin/gns/plugin_gnsrecord_gns.c 
b/src/plugin/gns/plugin_gnsrecord_gns.c
index cc0e3167a..36e0c9fde 100644
--- a/src/plugin/gns/plugin_gnsrecord_gns.c
+++ b/src/plugin/gns/plugin_gnsrecord_gns.c
@@ -337,7 +337,6 @@ gns_string_to_value (void *cls,
       size_t rest;
       char *prefix;
       char *underscore_prefix;
-      unsigned int protocol;
       unsigned int record_type;
       void *bval;
       size_t bval_size;

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