From 9ed99558e21ac6b81f112670b982262d2349e5a5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 22 Aug 2022 22:45:41 +0200 Subject: -fix clang compiler warnings --- src/util/age_restriction.c | 4 ++-- src/util/exchange_signatures.c | 10 ++++++---- src/util/taler-exchange-secmod-rsa.c | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src/util') diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c index 189ec4e8c..b87c8543e 100644 --- a/src/util/age_restriction.c +++ b/src/util/age_restriction.c @@ -39,7 +39,7 @@ TALER_age_commitment_hash ( } GNUNET_assert (__builtin_popcount (commitment->mask.bits) - 1 == - commitment->num); + (int) commitment->num); hash_context = GNUNET_CRYPTO_hash_context_start (); @@ -178,7 +178,7 @@ TALER_age_commitment_derive ( GNUNET_assert (NULL != newacp); GNUNET_assert (orig->proof.num <= orig->commitment.num); - GNUNET_assert (orig->commitment.num == + GNUNET_assert (((int) orig->commitment.num) == __builtin_popcount (orig->commitment.mask.bits) - 1); newacp->commitment.mask = orig->commitment.mask; diff --git a/src/util/exchange_signatures.c b/src/util/exchange_signatures.c index 3f590325c..52919d2e9 100644 --- a/src/util/exchange_signatures.c +++ b/src/util/exchange_signatures.c @@ -853,8 +853,9 @@ TALER_exchange_online_confirm_recoup_sign ( struct TALER_RecoupConfirmationPS pc = { .purpose.size = htonl (sizeof (pc)), .purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP), - .reserve_pub = *reserve_pub, - .coin_pub = *coin_pub + .timestamp = GNUNET_TIME_timestamp_hton (timestamp), + .coin_pub = *coin_pub, + .reserve_pub = *reserve_pub }; TALER_amount_hton (&pc.recoup_amount, @@ -877,8 +878,9 @@ TALER_exchange_online_confirm_recoup_verify ( struct TALER_RecoupConfirmationPS pc = { .purpose.size = htonl (sizeof (pc)), .purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP), - .reserve_pub = *reserve_pub, - .coin_pub = *coin_pub + .timestamp = GNUNET_TIME_timestamp_hton (timestamp), + .coin_pub = *coin_pub, + .reserve_pub = *reserve_pub }; TALER_amount_hton (&pc.recoup_amount, diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c index 40b4f51de..819312f69 100644 --- a/src/util/taler-exchange-secmod-rsa.c +++ b/src/util/taler-exchange-secmod-rsa.c @@ -583,6 +583,7 @@ sem_init (struct Semaphore *sem, GNUNET_assert (0 == pthread_cond_init (&sem->cv, NULL)); + sem->ctr = val; } -- cgit v1.2.3