gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 275/277: fix compiler warnings for test_merchantdb.c


From: gnunet
Subject: [taler-merchant] 275/277: fix compiler warnings for test_merchantdb.c
Date: Sun, 05 Jul 2020 20:53:08 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

commit 74e6cc62b8cf935d485d93a578a92615718d2e51
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
AuthorDate: Sat Jul 4 00:31:12 2020 -0400

    fix compiler warnings for test_merchantdb.c
---
 src/backenddb/test_merchantdb.c | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index 6ee6a41..cf3fa58 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -3234,11 +3234,11 @@ make_transfer (const struct ExchangeSignkeyData 
*signkey,
     details[i].coin_pub = deposits[i].coin_pub;
     details[i].coin_value = deposits[i].amount_with_fee;
     details[i].coin_fee = deposits[i].deposit_fee;
-    GNUNET_assert (GNUNET_OK ==
+    GNUNET_assert (0 <=
                    TALER_amount_add (&transfer->data.total_amount,
                                      &transfer->data.total_amount,
                                      &deposits[i].amount_with_fee));
-    GNUNET_assert (GNUNET_OK ==
+    GNUNET_assert (0 <=
                    TALER_amount_add (&transfer->deposit_fee,
                                      &transfer->deposit_fee,
                                      &deposits[i].deposit_fee));
@@ -3283,9 +3283,9 @@ test_lookup_transfer (const struct TransferData *transfer)
                 "Lookup transfer failed\n");
     return 1;
   }
-  GNUNET_assert (GNUNET_OK == TALER_amount_add (&total_with_fee,
-                                                &transfer->data.total_amount,
-                                                &transfer->data.wire_fee));
+  GNUNET_assert (0 <= TALER_amount_add (&total_with_fee,
+                                        &transfer->data.total_amount,
+                                        &transfer->data.wire_fee));
   if ((GNUNET_OK != TALER_amount_cmp_currency (&total_with_fee,
                                                &total)) ||
       (0 != TALER_amount_cmp (&total_with_fee,
@@ -4648,17 +4648,18 @@ test_lookup_tip_details (const struct InstanceData 
*instance,
   unsigned int pickups_length;
   struct TALER_MERCHANTDB_PickupDetails *pickups = NULL;
   unsigned int results_matching[expected_pickups_length];
-  if (TALER_EC_NONE != plugin->lookup_tip_details (plugin->cls,
-                                                   instance->instance.id,
-                                                   &tip->details.tip_id,
-                                                   true,
-                                                   &total_authorized,
-                                                   &total_picked_up,
-                                                   &justification,
-                                                   &expiration,
-                                                   &reserve_pub,
-                                                   &pickups_length,
-                                                   &pickups))
+  if (0 >
+      plugin->lookup_tip_details (plugin->cls,
+                                  instance->instance.id,
+                                  &tip->details.tip_id,
+                                  true,
+                                  &total_authorized,
+                                  &total_picked_up,
+                                  &justification,
+                                  &expiration,
+                                  &reserve_pub,
+                                  &pickups_length,
+                                  &pickups))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Lookup tip details failed\n");
@@ -5707,7 +5708,7 @@ run_test_refunds (struct TestRefunds_Closure *cls)
   GNUNET_assert (GNUNET_OK ==
                  TALER_string_to_amount ("EUR:1000.00",
                                          &inc));
-  TEST_COND_RET_ON_FAIL (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+  TEST_COND_RET_ON_FAIL (TALER_MERCHANTDB_RS_TOO_HIGH ==
                          plugin->increase_refund (plugin->cls,
                                                   cls->instance.instance.id,
                                                   cls->order.id,
@@ -5718,7 +5719,7 @@ run_test_refunds (struct TestRefunds_Closure *cls)
   GNUNET_assert (GNUNET_OK ==
                  TALER_string_to_amount ("EUR:1.00",
                                          &inc));
-  TEST_COND_RET_ON_FAIL (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT ==
+  TEST_COND_RET_ON_FAIL (TALER_MERCHANTDB_RS_SUCCESS ==
                          plugin->increase_refund (plugin->cls,
                                                   cls->instance.instance.id,
                                                   cls->order.id,

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