From 6b8915976460e0ef56af3fdc1524f62b619b8620 Mon Sep 17 00:00:00 2001 From: Manoj Patra Date: Tue, 14 Nov 2023 19:02:04 +0530 Subject: [PATCH] disable unused param warning --- src/handle_provide_parameter.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/handle_provide_parameter.c b/src/handle_provide_parameter.c index 1a30be8..f888aa2 100644 --- a/src/handle_provide_parameter.c +++ b/src/handle_provide_parameter.c @@ -5,8 +5,12 @@ static void handle_amount_received(const ethPluginProvideParameter_t *msg, conte copy_parameter(context->amount_received, msg->parameter, sizeof(context->amount_received)); } -static void handle_unsupported_param(ethPluginProvideParameter_t *msg, const context_t *context) { +static void handle_unsupported_param(ethPluginProvideParameter_t *msg) { +#ifdef DEBUG + context_t *context = (context_t *) msg->pluginContext; PRINTF("Param not supported: %d\n", context->next_param); +#endif + msg->result = ETH_PLUGIN_RESULT_ERROR; } @@ -19,7 +23,7 @@ static void handle_stake(ethPluginProvideParameter_t *msg, context_t *context) { break; // Keep this default: - handle_unsupported_param(msg, context); + handle_unsupported_param(msg); break; } } @@ -37,7 +41,7 @@ static void handle_unstake(ethPluginProvideParameter_t *msg, context_t *context) break; // Keep this default: - handle_unsupported_param(msg, context); + handle_unsupported_param(msg); break; } } @@ -51,7 +55,7 @@ static void handle_ethx_deposit(ethPluginProvideParameter_t *msg, context_t *con // Keep this default: - handle_unsupported_param(msg, context); + handle_unsupported_param(msg); break; } } @@ -70,7 +74,7 @@ static void handle_ethx_request_withdraw(ethPluginProvideParameter_t *msg, conte // Keep this default: - handle_unsupported_param(msg, context); + handle_unsupported_param(msg); break; } }