Skip to content

Commit

Permalink
OpenAPI: remove unused parameters
Browse files Browse the repository at this point in the history
This change is derrived from universal-ctags#3258.
The original commit is so large.
@masatake splited the commit smaller per-topic ones.
@masatake wrote this commit log.
  • Loading branch information
segoon authored and masatake committed Jan 9, 2022
1 parent 60650fa commit 79ce3ef
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions parsers/openapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 79ce3ef

Please sign in to comment.