From 7dead59b2917a6705db6bf0b57c025931bc3b910 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Fri, 24 Oct 2014 22:34:00 -0400 Subject: [PATCH] maybe fix the warnings --- source/sclpl/codegen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/sclpl/codegen.c b/source/sclpl/codegen.c index 8488828..4331862 100644 --- a/source/sclpl/codegen.c +++ b/source/sclpl/codegen.c @@ -141,13 +141,13 @@ static void emit_expression(FILE* file, vec_t* fnlst, tree_t* p_tree, int depth) if (p_tree->tag == ATOM) { lex_tok_t* tok = p_tree->ptr.tok; switch (tok->type) { - case T_STRING: print_string(file, ((char*)tok->value)); break; - case T_CHAR: print_char(file, ((char)(int)tok->value)); break; - case T_INT: fprintf(file, "__int(%ld)", *((long int*)tok->value)); break; - case T_FLOAT: fprintf(file, "__float(%f)", *((double*)tok->value)); break; - case T_BOOL: fprintf(file, "__bool(%s)", ((int)tok->value)?"true":"false"); break; - case T_VAR: fprintf(file, "%s", ((char*)tok->value)); break; - default: break; + case T_STRING: print_string(file, ((char*)tok->value)); break; + case T_CHAR: print_char(file, ((char)(intptr_t)tok->value)); break; + case T_INT: fprintf(file, "__int(%ld)", *((long int*)tok->value)); break; + case T_FLOAT: fprintf(file, "__float(%f)", *((double*)tok->value)); break; + case T_BOOL: fprintf(file, "__bool(%s)", ((intptr_t)tok->value)?"true":"false"); break; + case T_VAR: fprintf(file, "%s", ((char*)tok->value)); break; + default: break; } } else if (is_formtype(p_tree, "if")) { fprintf(file, "IF ("); -- 2.55.0