gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 01/02: build: fix more compile warnings


From: gnunet
Subject: [gnunet] 01/02: build: fix more compile warnings
Date: Mon, 09 Sep 2024 16:16:14 +0200

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

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 021f8198c71075e9923c51ac770275abadca1c9d
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Sep 9 15:32:26 2024 +0200

    build: fix more compile warnings
---
 src/lib/util/test_uri.c                       | 16 ++++++++--------
 src/service/cadet/gnunet-service-cadet_core.c |  8 ++++----
 src/service/gns/gnunet-bcd.c                  |  4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/lib/util/test_uri.c b/src/lib/util/test_uri.c
index d8fa38e96..1b65f47de 100644
--- a/src/lib/util/test_uri.c
+++ b/src/lib/util/test_uri.c
@@ -31,7 +31,7 @@
 
 /* run a test function and return result */
 #define mu_run_test(test) do { \
-    char *message = test (); tests_run++; \
+    const char *message = test (); tests_run++; \
     if (message) { return message; } \
   } while (0)
 
@@ -81,7 +81,7 @@ strcmp_wrap (const char *str,
   mu_silent_assert ("should set the fragment attribute correctly", \
                     0 == strcmp_wrap (as_url.fragment, as_fragment));
 
-static char *
+static const char *
 test_parse_http_url_ok (void)
 {
   int rc;
@@ -394,7 +394,7 @@ test_parse_http_url_ok (void)
   return NULL;
 }
 
-static char *
+static const char *
 test_parse_http_rel_url_ok (void)
 {
   int rc;
@@ -489,7 +489,7 @@ test_parse_http_rel_url_ok (void)
   return NULL;
 }
 
-static char *
+static const char *
 test_parse_url_fail (void)
 {
   int rc;
@@ -555,7 +555,7 @@ test_parse_url_fail (void)
   return NULL;
 }
 
-static char *
+static const char *
 test_split_path_ok (void)
 {
   int rc;
@@ -623,7 +623,7 @@ test_split_path_ok (void)
   return NULL;
 }
 
-static char *
+static const char *
 test_parse_query_ok (void)
 {
   int rc;
@@ -803,7 +803,7 @@ test_parse_query_ok (void)
   return NULL;
 }
 
-static char *
+static const char *
 all_tests (void)
 {
   mu_group ("GNUNET_uri_parse () with an HTTP URL");
@@ -827,7 +827,7 @@ all_tests (void)
 int
 main (void)
 {
-  char *result;
+  const char *result;
 
   result = all_tests ();
   if (result != NULL) {
diff --git a/src/service/cadet/gnunet-service-cadet_core.c 
b/src/service/cadet/gnunet-service-cadet_core.c
index 68f7405c3..8928b4076 100644
--- a/src/service/cadet/gnunet-service-cadet_core.c
+++ b/src/service/cadet/gnunet-service-cadet_core.c
@@ -325,7 +325,6 @@ route_message (struct CadetPeer *prev,
   route = get_route (cid);
   if (NULL == route)
   {
-    struct GNUNET_MQ_Envelope *env;
     struct GNUNET_CADET_ConnectionBrokenMessage *bm;
 
     LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -370,10 +369,11 @@ route_message (struct CadetPeer *prev,
        (GNUNET_MQ_env_get_options (dir->env_head) & 
GNUNET_MQ_PREF_UNRELIABLE)))
     discard_buffer (dir, dir->env_head);
   /* Check for duplicates */
-  for (const struct GNUNET_MQ_Envelope *env = dir->env_head; NULL != env;
-       env = GNUNET_MQ_env_next (env))
+  for (const struct GNUNET_MQ_Envelope *env_tmp = dir->env_head;
+       NULL != env_tmp;
+       env_tmp = GNUNET_MQ_env_next (env_tmp))
   {
-    const struct GNUNET_MessageHeader *hdr = GNUNET_MQ_env_get_msg (env);
+    const struct GNUNET_MessageHeader *hdr = GNUNET_MQ_env_get_msg (env_tmp);
 
     if ((hdr->size == msg->size) && (0 == memcmp (hdr, msg, ntohs 
(msg->size))))
     {
diff --git a/src/service/gns/gnunet-bcd.c b/src/service/gns/gnunet-bcd.c
index 0f7fb6507..c41a5629f 100644
--- a/src/service/gns/gnunet-bcd.c
+++ b/src/service/gns/gnunet-bcd.c
@@ -53,12 +53,12 @@ struct ParameterMap
   /**
    * Name of the parameter from the request.
    */
-  char *name;
+  const char *name;
 
   /**
    * Name of the definition in the TeX output.
    */
-  char *definition;
+  const char *definition;
 };
 
 /**

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