commit 582b2d9009839a5220517b2070708f7d4e77374b
parent 1d371b1c68d96fe132d5e6300aace9e219d313ac
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 2 Feb 2025 14:23:28 +0100
-fix compiler warnings
Diffstat:
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/util/contract_parse.c b/src/util/contract_parse.c
@@ -995,8 +995,16 @@ parse_contract_version (void *cls,
}
-struct GNUNET_JSON_Specification
-TALER_MERCHANT_JSON_spec_contract_version (
+/**
+ * Create JSON specification to parse a merchant contract
+ * version.
+ *
+ * @param name name of the field
+ * @param[out] version where to write the contract version
+ * @return JSON specification object
+ */
+static struct GNUNET_JSON_Specification
+spec_contract_version (
const char *name,
enum TALER_MERCHANT_ContractVersion *version)
{
@@ -1018,7 +1026,7 @@ TALER_MERCHANT_JSON_spec_contract_version (
* @param[out] contract where to write the data
* @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error
*/
-enum GNUNET_GenericReturnValue
+static enum GNUNET_GenericReturnValue
parse_contract_v0 (
json_t *input,
struct TALER_MERCHANT_Contract *contract)
@@ -1068,7 +1076,7 @@ parse_contract_v0 (
* @param[out] contract where to write the data
* @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error
*/
-enum GNUNET_GenericReturnValue
+static enum GNUNET_GenericReturnValue
parse_contract_v1 (
json_t *input,
struct TALER_MERCHANT_Contract *contract)
@@ -1110,12 +1118,11 @@ struct TALER_MERCHANT_Contract *
TALER_MERCHANT_contract_parse (json_t *input,
bool nonce_optional)
{
- struct TALER_MERCHANT_Contract *contract;
- contract = GNUNET_new (struct TALER_MERCHANT_Contract);
-
+ struct TALER_MERCHANT_Contract *contract
+ = GNUNET_new (struct TALER_MERCHANT_Contract);
struct GNUNET_JSON_Specification espec[] = {
- TALER_MERCHANT_JSON_spec_contract_version ("version",
- &contract->version),
+ spec_contract_version ("version",
+ &contract->version),
GNUNET_JSON_spec_string_copy ("summary",
&contract->summary),
/* FIXME: do i18n_str validation in the future */