From 79ce3eff961c66ae86e28edd3c90e855f8dc7b7c Mon Sep 17 00:00:00 2001 From: Vasily Kulikov Date: Thu, 6 Jan 2022 19:06:51 +0300 Subject: [PATCH] OpenAPI: remove unused parameters This change is derrived from #3258. The original commit is so large. @masatake splited the commit smaller per-topic ones. @masatake wrote this commit log. --- parsers/openapi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/parsers/openapi.c b/parsers/openapi.c index 690f46228b..ffadd2c7b8 100644 --- a/parsers/openapi.c +++ b/parsers/openapi.c @@ -89,8 +89,7 @@ static void pushBlockType (struct sOpenAPISubparser *openapi, yaml_token_type_t s->key = KEY_UNKNOWN; } -static void popBlockType (struct sOpenAPISubparser *openapi, - yaml_token_t *token) +static void popBlockType (struct sOpenAPISubparser *openapi) { struct yamlBlockTypeStack *s; @@ -102,11 +101,10 @@ static void popBlockType (struct sOpenAPISubparser *openapi, eFree (s); } -static void popAllBlockType (struct sOpenAPISubparser *openapi, - yaml_token_t *token) +static void popAllBlockType (struct sOpenAPISubparser *openapi) { while (openapi->type_stack) - popBlockType (openapi, token); + popBlockType (openapi); } static bool stateStackMatch (struct yamlBlockTypeStack *stack, @@ -307,9 +305,9 @@ static void newTokenCallback (yamlSubparser *s, yaml_token_t *token) openapiPlayStateMachine ((struct sOpenAPISubparser *)s, token); if (token->type == YAML_BLOCK_END_TOKEN) - popBlockType ((struct sOpenAPISubparser *)s, token); + popBlockType ((struct sOpenAPISubparser *)s); else if (token->type == YAML_STREAM_END_TOKEN) - popAllBlockType ((struct sOpenAPISubparser *)s, token); + popAllBlockType ((struct sOpenAPISubparser *)s); } static void inputStart(subparser *s)