Fixed warning in accessor __SET_EXTERNAL
authorLaurent Bessard
Thu, 02 May 2013 10:42:17 +0200
changeset 817 6a67fbc7bea7
parent 816 dcd861dda04a
child 818 2a3f34967cae
Fixed warning in accessor __SET_EXTERNAL
lib/accessor.h
--- a/lib/accessor.h	Thu Apr 18 22:27:01 2013 +0200
+++ b/lib/accessor.h	Thu May 02 10:42:17 2013 +0200
@@ -105,7 +105,8 @@
 #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, ...)\
-	if (!(prefix name.flags & __IEC_FORCE_FLAG || __IS_GLOBAL_##name##_FORCED()))\
+	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
 #define __SET_EXTERNAL_FB(prefix, name, new_value, ...)\
 	__SET_VAR((*(prefix name)), __VA_ARGS__, new_value)