From: Michael D. Lowis Date: Sat, 25 Oct 2014 02:34:00 +0000 (-0400) Subject: maybe fix the warnings X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7dead59b2917a6705db6bf0b57c025931bc3b910;p=proto%2Fsclpl.git maybe fix the warnings --- 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 (");