mirror of
https://github.com/pnx/m16vm
synced 2026-06-16 03:44:55 +02:00
as/parser.c: fix compiler warning by doing some casts.
This commit is contained in:
parent
f871cb55ef
commit
5b1bf5b412
1 changed files with 2 additions and 2 deletions
|
|
@ -72,9 +72,9 @@ static int match_operand(struct lexer* lex, enum token_type type, struct ast *as
|
|||
return -1;
|
||||
|
||||
if (type == TOKEN_REG) {
|
||||
ast_instr_operand(ast, DATATYPE_REGISTER, lex->token.value.n);
|
||||
ast_instr_operand(ast, DATATYPE_REGISTER, *((void**) &lex->token.value.n));
|
||||
} else if (type == TOKEN_NUMBER) {
|
||||
ast_instr_operand(ast, DATATYPE_NUMBER, lex->token.value.n);
|
||||
ast_instr_operand(ast, DATATYPE_NUMBER, *((void**) &lex->token.value.n));
|
||||
} else {
|
||||
ast_instr_operand(ast, DATATYPE_STRING, lex->token.value.s);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue