From 77bef7dc2df59d74afcd5c507841458ebf19885c Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Mon, 22 Jul 2024 14:34:41 +0200 Subject: [PATCH] Fix compilation warnings --- src/handle_provide_parameter.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/handle_provide_parameter.c b/src/handle_provide_parameter.c index d626713..1b16929 100644 --- a/src/handle_provide_parameter.c +++ b/src/handle_provide_parameter.c @@ -296,13 +296,15 @@ static void handle_megaswap(ethPluginProvideParameter_t *msg, paraswap_parameter } context->next_param = PATHS_LEN; break; - case PATHS_LEN: - if (!U2BE_from_parameter(msg->parameter, &context->skip)) { + case PATHS_LEN: { + uint16_t skip; + if (!U2BE_from_parameter(msg->parameter, &skip)) { msg->result = ETH_PLUGIN_RESULT_ERROR; } + context->skip = (uint8_t) skip; context->skip--; // Decrease by one because we wish to acces path[-1]. context->next_param = PATH; - break; + } break; case PATH: context->checkpoint = msg->parameterOffset; if (!U2BE_from_parameter(msg->parameter, &context->offset)) {