Skip to content

Commit 79ce3ef

Browse files
segoonmasatake
authored andcommitted
OpenAPI: remove unused parameters
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.
1 parent 60650fa commit 79ce3ef

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

parsers/openapi.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ static void pushBlockType (struct sOpenAPISubparser *openapi, yaml_token_type_t
8989
s->key = KEY_UNKNOWN;
9090
}
9191

92-
static void popBlockType (struct sOpenAPISubparser *openapi,
93-
yaml_token_t *token)
92+
static void popBlockType (struct sOpenAPISubparser *openapi)
9493
{
9594
struct yamlBlockTypeStack *s;
9695

@@ -102,11 +101,10 @@ static void popBlockType (struct sOpenAPISubparser *openapi,
102101
eFree (s);
103102
}
104103

105-
static void popAllBlockType (struct sOpenAPISubparser *openapi,
106-
yaml_token_t *token)
104+
static void popAllBlockType (struct sOpenAPISubparser *openapi)
107105
{
108106
while (openapi->type_stack)
109-
popBlockType (openapi, token);
107+
popBlockType (openapi);
110108
}
111109

112110
static bool stateStackMatch (struct yamlBlockTypeStack *stack,
@@ -307,9 +305,9 @@ static void newTokenCallback (yamlSubparser *s, yaml_token_t *token)
307305
openapiPlayStateMachine ((struct sOpenAPISubparser *)s, token);
308306

309307
if (token->type == YAML_BLOCK_END_TOKEN)
310-
popBlockType ((struct sOpenAPISubparser *)s, token);
308+
popBlockType ((struct sOpenAPISubparser *)s);
311309
else if (token->type == YAML_STREAM_END_TOKEN)
312-
popAllBlockType ((struct sOpenAPISubparser *)s, token);
310+
popAllBlockType ((struct sOpenAPISubparser *)s);
313311
}
314312

315313
static void inputStart(subparser *s)

0 commit comments

Comments
 (0)