mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 04:41:25 +00:00
unused params in parser.c
This commit is contained in:
parent
facd89b188
commit
905ca8819b
1 changed files with 16 additions and 3 deletions
19
parser.c
19
parser.c
|
@ -1411,6 +1411,8 @@ static bool parse_if(parser_t *parser, ast_block *block, ast_expression **out)
|
||||||
|
|
||||||
lex_ctx ctx = parser_ctx(parser);
|
lex_ctx ctx = parser_ctx(parser);
|
||||||
|
|
||||||
|
(void)block; /* not touching */
|
||||||
|
|
||||||
/* skip the 'if', parse an optional 'not' and check for an opening paren */
|
/* skip the 'if', parse an optional 'not' and check for an opening paren */
|
||||||
if (!parser_next(parser)) {
|
if (!parser_next(parser)) {
|
||||||
parseerror(parser, "expected condition or 'not'");
|
parseerror(parser, "expected condition or 'not'");
|
||||||
|
@ -1485,6 +1487,8 @@ static bool parse_while(parser_t *parser, ast_block *block, ast_expression **out
|
||||||
|
|
||||||
lex_ctx ctx = parser_ctx(parser);
|
lex_ctx ctx = parser_ctx(parser);
|
||||||
|
|
||||||
|
(void)block; /* not touching */
|
||||||
|
|
||||||
/* skip the 'while' and check for opening paren */
|
/* skip the 'while' and check for opening paren */
|
||||||
if (!parser_next(parser) || parser->tok != '(') {
|
if (!parser_next(parser) || parser->tok != '(') {
|
||||||
parseerror(parser, "expected 'while' condition in parenthesis");
|
parseerror(parser, "expected 'while' condition in parenthesis");
|
||||||
|
@ -1529,6 +1533,8 @@ static bool parse_dowhile(parser_t *parser, ast_block *block, ast_expression **o
|
||||||
|
|
||||||
lex_ctx ctx = parser_ctx(parser);
|
lex_ctx ctx = parser_ctx(parser);
|
||||||
|
|
||||||
|
(void)block; /* not touching */
|
||||||
|
|
||||||
/* skip the 'do' and get the body */
|
/* skip the 'do' and get the body */
|
||||||
if (!parser_next(parser)) {
|
if (!parser_next(parser)) {
|
||||||
parseerror(parser, "expected loop body");
|
parseerror(parser, "expected loop body");
|
||||||
|
@ -1716,6 +1722,8 @@ static bool parse_return(parser_t *parser, ast_block *block, ast_expression **ou
|
||||||
ast_return *ret = NULL;
|
ast_return *ret = NULL;
|
||||||
ast_value *expected = parser->function->vtype;
|
ast_value *expected = parser->function->vtype;
|
||||||
|
|
||||||
|
(void)block; /* not touching */
|
||||||
|
|
||||||
if (!parser_next(parser)) {
|
if (!parser_next(parser)) {
|
||||||
parseerror(parser, "expected return expression");
|
parseerror(parser, "expected return expression");
|
||||||
return false;
|
return false;
|
||||||
|
@ -1754,6 +1762,8 @@ static bool parse_break_continue(parser_t *parser, ast_block *block, ast_express
|
||||||
{
|
{
|
||||||
lex_ctx ctx = parser_ctx(parser);
|
lex_ctx ctx = parser_ctx(parser);
|
||||||
|
|
||||||
|
(void)block; /* not touching */
|
||||||
|
|
||||||
if (!parser_next(parser) || parser->tok != ';') {
|
if (!parser_next(parser) || parser->tok != ';') {
|
||||||
parseerror(parser, "expected semicolon");
|
parseerror(parser, "expected semicolon");
|
||||||
return false;
|
return false;
|
||||||
|
@ -1775,6 +1785,8 @@ static bool parse_switch(parser_t *parser, ast_block *block, ast_expression **ou
|
||||||
|
|
||||||
lex_ctx ctx = parser_ctx(parser);
|
lex_ctx ctx = parser_ctx(parser);
|
||||||
|
|
||||||
|
(void)block; /* not touching */
|
||||||
|
|
||||||
/* parse over the opening paren */
|
/* parse over the opening paren */
|
||||||
if (!parser_next(parser) || parser->tok != '(') {
|
if (!parser_next(parser) || parser->tok != '(') {
|
||||||
parseerror(parser, "expected switch operand in parenthesis");
|
parseerror(parser, "expected switch operand in parenthesis");
|
||||||
|
@ -2114,7 +2126,7 @@ static ast_expression* parse_statement_or_block(parser_t *parser)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loop method */
|
/* loop method */
|
||||||
static bool create_vector_members(parser_t *parser, ast_value *var, varentry_t *ve)
|
static bool create_vector_members(ast_value *var, varentry_t *ve)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
size_t len = strlen(var->name);
|
size_t len = strlen(var->name);
|
||||||
|
@ -2376,7 +2388,7 @@ static bool parse_function_body(parser_t *parser, ast_value *var)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!create_vector_members(parser, param, ve)) {
|
if (!create_vector_members(param, ve)) {
|
||||||
ast_block_delete(block);
|
ast_block_delete(block);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3278,7 +3290,7 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
|
||||||
isvector = true;
|
isvector = true;
|
||||||
|
|
||||||
if (isvector) {
|
if (isvector) {
|
||||||
if (!create_vector_members(parser, var, ve)) {
|
if (!create_vector_members(var, ve)) {
|
||||||
retval = false;
|
retval = false;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -3587,6 +3599,7 @@ static uint16_t progdefs_crc_sum(uint16_t old, const char *str)
|
||||||
static void progdefs_crc_file(const char *str)
|
static void progdefs_crc_file(const char *str)
|
||||||
{
|
{
|
||||||
/* write to progdefs.h here */
|
/* write to progdefs.h here */
|
||||||
|
(void)str;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint16_t progdefs_crc_both(uint16_t old, const char *str)
|
static uint16_t progdefs_crc_both(uint16_t old, const char *str)
|
||||||
|
|
Loading…
Reference in a new issue