gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 05/06: fixed compiler warnings


From: gnunet
Subject: [taler-anastasis] 05/06: fixed compiler warnings
Date: Sun, 05 Jul 2020 19:13:19 +0200

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

dennis-neufeld pushed a commit to branch master
in repository anastasis.

commit 43d00be3ba0cfca38f70d1d50c45d5f7b0a80b45
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Sun Jul 5 17:04:41 2020 +0000

    fixed compiler warnings
---
 src/cli/anastasis-cli-assembler.c | 12 +++++-------
 src/cli/anastasis-cli-splitter.c  |  6 ++++--
 src/include/anastasis.h           |  6 +++---
 src/lib/anastasis.c               |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/cli/anastasis-cli-assembler.c 
b/src/cli/anastasis-cli-assembler.c
index 58eb76d..408ba76 100644
--- a/src/cli/anastasis-cli-assembler.c
+++ b/src/cli/anastasis-cli-assembler.c
@@ -333,7 +333,7 @@ read_keyboard_command (void *cls)
     {
       // Calculate costs
       struct TALER_Amount *costs; // different cost for different currencies
-      const char **currencies;
+      char **currencies;
       unsigned int costs_len = 0;
 
       for (unsigned int j = 0; j < policies[i].uuids_length; j++)
@@ -357,7 +357,7 @@ read_keyboard_command (void *cls)
             if (0 == costs_len)
             {
               costs = GNUNET_new_array (1, struct TALER_Amount);
-              currencies = GNUNET_new_array (1, const char *);
+              currencies = GNUNET_new_array (1, char *);
 
               GNUNET_assert (GNUNET_OK ==
                              TALER_amount_get_zero (challenges[k].currency,
@@ -407,8 +407,8 @@ read_keyboard_command (void *cls)
         for (unsigned int k = 0; k < challenges_length; k++)
         {
           if (0 == uuid_compare (policies[i].escrow_uuids[j],
-                                 challenges[k].uuid))
-            if (1 != challenges[k].solved)
+                                 *challenges[k].uuid))
+            if (1 != *challenges[k].solved)
               printf ("truth#%u ", k);
         }
       }
@@ -601,7 +601,7 @@ config_cb (void *cls,
   unsigned int contains = 0;
   for (unsigned int i = 0; i < challenges_length; i++)
   {
-    if (0 == uuid_compare (challenges[i].uuid, cs->ci->uuid))
+    if (0 == uuid_compare (*challenges[i].uuid, *cs->ci->uuid))
     {
       contains = 1;
       break;
@@ -676,11 +676,9 @@ core_secret_cb (void *cls,
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "At %s:%d arrived at core secret cb \n", __FILE__, __LINE__);
-  struct RecoverSecretState *rss = cls;
   printf ("Secret was: \"%s\" Size: %lu b\n",
           (char *) secret,
           secret_size);
-
   return;
 }
 
diff --git a/src/cli/anastasis-cli-splitter.c b/src/cli/anastasis-cli-splitter.c
index 0a0f4fd..37d3b91 100644
--- a/src/cli/anastasis-cli-splitter.c
+++ b/src/cli/anastasis-cli-splitter.c
@@ -152,7 +152,7 @@ struct ServerInfo
   /**
    * user identifier derived from user data and backend salt
    */
-  const struct ANASTASIS_CRYPTO_UserIdentifierP *user_id;
+  struct ANASTASIS_CRYPTO_UserIdentifierP *user_id;
 };
 
 /**
@@ -1141,9 +1141,11 @@ read_keyboard_command (void *cls)
         {
           add_history (buffer);
           pds[i].payment_order_id = GNUNET_malloc (characters + 1);
-          GNUNET_strlcpy (pds[i].payment_order_id,
+          char *payment_order_id = NULL;
+          GNUNET_strlcpy (payment_order_id,
                           buffer,
                           characters);
+          pds[i].payment_order_id = (const char*) payment_order_id;
           free (buffer);
         }
         printf ("\n");
diff --git a/src/include/anastasis.h b/src/include/anastasis.h
index 5ef5954..6819cd3 100644
--- a/src/include/anastasis.h
+++ b/src/include/anastasis.h
@@ -153,11 +153,11 @@ struct ANASTASIS_ChallengeInformation
   const char *method;
   const char *url;
   const char *instructions;
-  const struct TALER_Amount *cost;
+  struct TALER_Amount *cost;
   const unsigned int *solved;
   const uuid_t *uuid;
-  const char *currency;
-  const struct ANASTASIS_Challenge *challenge;
+  char *currency;
+  struct ANASTASIS_Challenge *challenge;
 };
 
 /**
diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index 5dcd8ac..da47dc0 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -1682,7 +1682,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
     {
       char buf[36];
       uuid_unparse (policies[k]->uuids[a], buf);
-      strncpy (uuids + a * strlen (buf),buf, strlen (buf));
+      strncpy (uuids + a * strlen (buf), buf, strlen (buf));
     }
     uuids[36 * policies[k]->uuids_length] = '\0';
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,

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