fix compilation error about missing braces
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 06 May 2016 11:48:02 +0300
changeset 1008 59435d4c5e0c
parent 1007 afb3974f8fb3
child 1009 d7d3a0db7cc2
child 1021 21a97cdb317d
child 1022 0d4d3a502d82
fix compilation error about missing braces

IEC_TIMESPEC has two fields tv_sec and tv_nsec.

Compilation error:
./build/POUS.c:600:45: error: missing braces around initializer [-Werror=missing-braces]
static const STEP temp_step = {{0, 0}, 0, {0, 0}};
^
compilation terminated due to -Wfatal-errors.
stage4/generate_c/generate_c_sfcdecl.cc
--- a/stage4/generate_c/generate_c_sfcdecl.cc	Fri May 06 11:38:35 2016 +0300
+++ b/stage4/generate_c/generate_c_sfcdecl.cc	Fri May 06 11:48:02 2016 +0300
@@ -130,7 +130,7 @@
           wanted_sfcdeclaration = sfcinit_sd;
           
           /* steps table initialisation */
-          s4o.print(s4o.indent_spaces + "static const STEP temp_step = {{0, 0}, 0, {0, 0}};\n");
+          s4o.print(s4o.indent_spaces + "static const STEP temp_step = {{0, 0}, 0, {{0, 0}, 0}};\n");
           s4o.print(s4o.indent_spaces + "for(i = 0; i < ");
           print_variable_prefix();
           s4o.print("__nb_steps; i++) {\n");