--- a/lib/C/accessor.h Thu Jun 02 11:59:45 2016 +0100
+++ b/lib/C/accessor.h Tue Jun 28 16:35:47 2016 +0300
@@ -125,7 +125,7 @@
#define __SET_VAR(prefix, name, suffix, new_value)\
if (!(prefix name.flags & __IEC_FORCE_FLAG)) prefix name.value suffix = new_value
#define __SET_EXTERNAL(prefix, name, suffix, new_value)\
- {extern IEC_BYTE __IS_GLOBAL_##name##_FORCED();\
+ {extern IEC_BYTE __IS_GLOBAL_##name##_FORCED(void);\
if (!(prefix name.flags & __IEC_FORCE_FLAG || __IS_GLOBAL_##name##_FORCED()))\
(*(prefix name.value)) suffix = new_value;}
#define __SET_EXTERNAL_FB(prefix, name, suffix, new_value)\
--- a/lib/C/iec_std_lib.h Thu Jun 02 11:59:45 2016 +0100
+++ b/lib/C/iec_std_lib.h Tue Jun 28 16:35:47 2016 +0300
@@ -246,7 +246,7 @@
/* NOTE: The following function was turned into a macro, so it could be used to initialize the initial value of TOD (TIME_OF_DAY) variables */
-/* NOTE: many (but not all) of the same comments made regarding __time_to_timespec() are also valid here, so go and read those comments too!
+/* NOTE: many (but not all) of the same comments made regarding __time_to_timespec() are also valid here, so go and read those comments too!*/
/*
static inline IEC_TIMESPEC __tod_to_timespec(double seconds, double minutes, double hours) {
IEC_TIMESPEC ts;
--- a/stage4/generate_c/generate_c.cc Thu Jun 02 11:59:45 2016 +0100
+++ b/stage4/generate_c/generate_c.cc Tue Jun 28 16:35:47 2016 +0300
@@ -2328,7 +2328,7 @@
config_s4o.print("unsigned long long common_ticktime__ = ");
config_s4o.print_long_long_integer(common_ticktime);
config_s4o.print("; /*ns*/\n");
- config_s4o.print("unsigned long greatest_tick_count__ = ");
+ config_s4o.print("unsigned long greatest_tick_count__ = (unsigned long)");
config_s4o.print_long_integer(calculate_common_ticktime.get_greatest_tick_count());
config_s4o.print("; /*tick*/\n");
}
--- a/stage4/generate_c/generate_c_sfcdecl.cc Thu Jun 02 11:59:45 2016 +0100
+++ b/stage4/generate_c/generate_c_sfcdecl.cc Tue Jun 28 16:35:47 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");