From 0af59a203f1f73c8b6267b59b78f55f92e840c09 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 19 Sep 2009 16:04:36 -0700 Subject: [PATCH] orcc: fix warning in generated code --- tools/orcc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/orcc.c b/tools/orcc.c index 32ded6d..2311208 100644 --- a/tools/orcc.c +++ b/tools/orcc.c @@ -717,8 +717,13 @@ output_code_test (OrcProgram *p, FILE *output) for(i=0;i<8;i++){ var = &p->vars[ORC_VAR_C1 + i]; if (var->size) { - fprintf(output, " orc_program_add_constant (p, %d, %d, \"%s\");\n", - var->size, var->value, varnames[ORC_VAR_C1 + i]); + if (var->value != 0x80000000) { + fprintf(output, " orc_program_add_constant (p, %d, %u, \"%s\");\n", + var->size, var->value, varnames[ORC_VAR_C1 + i]); + } else { + fprintf(output, " orc_program_add_constant (p, %d, 0x%08x, \"%s\");\n", + var->size, var->value, varnames[ORC_VAR_C1 + i]); + } } } for(i=0;i<8;i++){ -- 2.7.4