From 5b1bf5b4121e9a1e913d697d685a83fa0fca000e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 14 Mar 2019 11:34:54 +0100 Subject: [PATCH] as/parser.c: fix compiler warning by doing some casts. --- as/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/as/parser.c b/as/parser.c index 15ad57e..7d9dcfa 100644 --- a/as/parser.c +++ b/as/parser.c @@ -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); }