Fixed warning when compiling generated program containing external variable assignments
authorLaurent Bessard
Fri, 11 Oct 2013 12:38:36 +0200
changeset 821 fa4569bf1538
parent 820 62b55ca5b879
child 822 a7d9e0b8636b
Fixed warning when compiling generated program containing external variable assignments
lib/accessor.h
--- a/lib/accessor.h	Fri Jun 07 11:27:29 2013 +0900
+++ b/lib/accessor.h	Fri Oct 11 12:38:36 2013 +0200
@@ -105,9 +105,9 @@
 #define __SET_VAR(prefix, name, new_value, ...)\
 	if (!(prefix name.flags & __IEC_FORCE_FLAG)) prefix name.value __VA_ARGS__ = new_value
 #define __SET_EXTERNAL(prefix, name, new_value, ...)\
-	{extern IEC_BYTE __IS_GLOBAL_##name##_FORCED();\
-    if (!(prefix name.flags & __IEC_FORCE_FLAG || __IS_GLOBAL_##name##_FORCED()))\
-		(*(prefix name.value)) __VA_ARGS__ = new_value;}
+	{extern IEC_BYTE __IS_GLOBAL_##name##_FORCED(void);\
+     if (!(prefix name.flags & __IEC_FORCE_FLAG || __IS_GLOBAL_##name##_FORCED()))\
+		 (*(prefix name.value)) __VA_ARGS__ = new_value;}
 #define __SET_EXTERNAL_FB(prefix, name, new_value, ...)\
 	__SET_VAR((*(prefix name)), __VA_ARGS__, new_value)
 #define __SET_LOCATED(prefix, name, new_value, ...)\