From 0b33a142b1d4aed43f305e741bcca840fbc6ac17 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Mon, 26 May 2014 15:37:33 +0300 Subject: [PATCH] Eolian: fix generation when optimization is set. When using -O2 or -O3, the Eina_Bool legacy_support (unsigned char) was overriding the int eo_needed. The result was a failure during options check: Eo flag is not specified (use --eo). Aborting eo generation. @fix --- src/bin/eolian/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c index 84fa08366c..bab4577e8c 100644 --- a/src/bin/eolian/main.c +++ b/src/bin/eolian/main.c @@ -219,7 +219,7 @@ enum }; static int gen_opt = NO_WAY_GEN; static int eo_needed = 0; -static Eina_Bool legacy_support = EINA_FALSE; +static int legacy_support = 0; int main(int argc, char **argv) { @@ -255,7 +255,7 @@ int main(int argc, char **argv) {"gc", no_argument, &gen_opt, C_GEN}, {"gi", no_argument, &gen_opt, C_IMPL_GEN}, {"output", required_argument, 0, 'o'}, - {"legacy", no_argument, (int *)&legacy_support, EINA_TRUE}, + {"legacy", no_argument, &legacy_support, 1}, {"include", required_argument, 0, 'I'}, {0, 0, 0, 0} }; @@ -356,7 +356,7 @@ int main(int argc, char **argv) case C_GEN: { INF("Generating source file %s\n", output_filename); - ret = _generate_c_file(output_filename, class, legacy_support)?0:1; + ret = _generate_c_file(output_filename, class, !!legacy_support)?0:1; break; } case C_IMPL_GEN: