fixed warnings in plc_python.c
authorEdouard Tisserant
Thu, 22 Sep 2011 17:00:56 +0200
changeset 613 be0ceea3b6dd
parent 612 f44651506a88
child 614 eed1dcf311a1
fixed warnings in plc_python.c
plugins/python/plc_python.c
--- a/plugins/python/plc_python.c	Thu Sep 22 16:59:59 2011 +0200
+++ b/plugins/python/plc_python.c	Thu Sep 22 17:00:56 2011 +0200
@@ -127,7 +127,7 @@
 		   __GET_VAR(data__->STATE) == PYTHON_FB_FREE)
 		{
 			/* Enter the block in the fifo
-			/* Don't have to check if fifo cell is free
+			 * Don't have to check if fifo cell is free
 			 * as fifo size == FB count, and a FB cannot
 			 * be requested twice */
 			EvalFBs[Current_PLC_EvalFB] = data__;
@@ -176,7 +176,7 @@
 				/* TODO : signal error */
 			}
 			/* Copy results to buffer */
-			strncpy(__GET_VAR(data__->BUFFER, .body), result, __GET_VAR(data__->BUFFER,.len));
+			strncpy((char*)__GET_VAR(data__->BUFFER, .body), result, __GET_VAR(data__->BUFFER,.len));
 	   	}else{
 	   	    __SET_VAR(data__->BUFFER, 0, .len);
 	   	}
@@ -207,7 +207,7 @@
 	/* make BUFFER a null terminated string */
 	__SET_VAR(data__->BUFFER, 0, .body[__GET_VAR(data__->BUFFER, .len)]);
 	/* next command is BUFFER */
-	next_command = __GET_VAR(data__->BUFFER, .body);
+	next_command = (char*)__GET_VAR(data__->BUFFER, .body);
 	/* free python mutex */
 	UnLockPython();
 	/* return the next command to eval */