[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.
- [taler-merchant] 265/277: got tips test working again, (continued)
- [taler-merchant] 265/277: got tips test working again, gnunet, 2020/07/05
- [taler-merchant] 261/277: removed hardcoded row numbers from backenddb tests, gnunet, 2020/07/05
- [taler-merchant] 263/277: long polling test for GET /private/orders, gnunet, 2020/07/05
- [taler-merchant] 270/277: twister, get tips, instance, and post transfer tests, gnunet, 2020/07/05
- [taler-merchant] 259/277: more docs/thorough checks for backend db & long polling for merchant get order, gnunet, 2020/07/05
- [taler-merchant] 266/277: get reserve and tip testing commands use variadic args, gnunet, 2020/07/05
- [taler-merchant] 267/277: get pay-again and pay-abort working again, gnunet, 2020/07/05
- [taler-merchant] 272/277: more merchant benchmark cleanup, gnunet, 2020/07/05
- [taler-merchant] 273/277: use improved rewind API, gnunet, 2020/07/05
- [taler-merchant] 274/277: test GET /private/transfers, gnunet, 2020/07/05
- [taler-merchant] 275/277: fix compiler warnings for test_merchantdb.c,
gnunet <=
- [taler-merchant] 268/277: improved db tests for transfers, gnunet, 2020/07/05
- [taler-merchant] 269/277: removed outdated test code, gnunet, 2020/07/05
- [taler-merchant] 271/277: some clean up of merchant benchmark code, gnunet, 2020/07/05
- [taler-merchant] 276/277: avoid allocation, gnunet, 2020/07/05
- [taler-merchant] 277/277: GNUNET_free_non_null -> GNUNET_free rename, gnunet, 2020/07/05