1
0
Fork 0
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:
Henrik Hautakoski 2019-03-14 11:34:54 +01:00
parent f871cb55ef
commit 5b1bf5b412
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -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);
}