commit 28b573fa28a04e8929356f48f3a40e70d3c25e67
parent 88d00232a4fb0ded6ec9db13348294bb3ba2e218
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 12 Jul 2026 22:20:03 +0200
fix compiler warnings
Diffstat:
3 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/src/benchmark/taler-aggregator-benchmark.c b/src/benchmark/taler-aggregator-benchmark.c
@@ -114,7 +114,7 @@ eval_probability (float probability)
uint64_t random;
float random_01;
- if (probability <= 0.0)
+ if (probability <= 0.0f)
return GNUNET_NO;
random = GNUNET_CRYPTO_random_u64 (UINT64_MAX);
random_01 = (double) random / (double) UINT64_MAX;
diff --git a/src/testing/testing_api_cmd_reserve_history.c b/src/testing/testing_api_cmd_reserve_history.c
@@ -304,7 +304,7 @@ analyze_command (void *cls,
{
const struct TALER_ReservePublicKeyP *rp;
- bool matched = false;
+ bool matched;
if (GNUNET_OK !=
TALER_TESTING_get_trait_reserve_pub (cmd,
@@ -330,6 +330,7 @@ analyze_command (void *cls,
j);
return; /* command does nothing for reserves */
}
+ matched = false;
for (unsigned int i = 0; i<history_length; i++)
{
if (found[i])
@@ -340,20 +341,17 @@ analyze_command (void *cls,
{
found[i] = true;
matched = true;
- ac->failure = false;
break;
}
}
- if (matched)
- break;
- }
- if (! matched)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Command `%s' no relevant reserve history entry not found\n",
- cmd->label);
- ac->failure = true;
- ;
+ if (! matched)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Command `%s' no relevant reserve history entry not found\n",
+ cmd->label);
+ ac->failure = true;
+ return;
+ }
}
}
}
diff --git a/src/util/payto.c b/src/util/payto.c
@@ -247,16 +247,15 @@ validate_payto_iban (const char *payto_uri)
IBAN_PREFIX,
strlen (IBAN_PREFIX)))
return NULL; /* not an IBAN */
+ q = memchr (payto_uri,
+ '?',
+ slen);
/* Find the last '/' that is part of the path, i.e. before any '?'
query part ('/' is a legal character in a query value and must
not be mistaken for the path separator). */
{
- const char *q;
const char *slash;
- q = memchr (payto_uri,
- '?',
- slen);
slash = memrchr (payto_uri,
'/',
(NULL == q)
@@ -266,8 +265,6 @@ validate_payto_iban (const char *payto_uri)
iban = slash + 1;
}
#undef IBAN_PREFIX
- q = strchr (iban,
- '?');
if (NULL != q)
{
result = GNUNET_strndup (iban,