Fixed GCC warnings when building stub code for python PLC globals access
authorEdouard Tisserant
Thu, 16 May 2013 20:42:48 +0900
changeset 1160 e9e9d3193894
parent 1159 950787298c96
child 1168 7838595559ba
Fixed GCC warnings when building stub code for python PLC globals access
py_ext/PythonFileCTNMixin.py
--- a/py_ext/PythonFileCTNMixin.py	Thu May 16 13:13:00 2013 +0200
+++ b/py_ext/PythonFileCTNMixin.py	Thu May 16 20:42:48 2013 +0900
@@ -127,12 +127,11 @@
 long __%(name)s_wlock = 0;
 int __%(name)s_wbuffer_written = 0;
 void __SafeGetPLCGlob_%(name)s(IEC_%(IECtype)s *pvalue){
-    IEC_%(IECtype)s res;
     while(AtomicCompareExchange(&__%(name)s_rlock, 0, 1));
     *pvalue = __%(name)s_rbuffer;
     AtomicCompareExchange((long*)&__%(name)s_rlock, 1, 0);
 }
-__SafeSetPLCGlob_%(name)s(IEC_%(IECtype)s *value){
+void __SafeSetPLCGlob_%(name)s(IEC_%(IECtype)s *value){
     while(AtomicCompareExchange(&__%(name)s_wlock, 0, 1));
     __%(name)s_wbuffer = *value;
     __%(name)s_wbuffer_written = 1;