# HG changeset patch # User Edouard Tisserant # Date 1316703656 -7200 # Node ID be0ceea3b6dd9a252c301d6e3d2b4cfbb0b91ed3 # Parent f44651506a88e708cec1b6102253f2a4a8a86247 fixed warnings in plc_python.c diff -r f44651506a88 -r be0ceea3b6dd 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 */