fix warnings and fix error (#128)

This commit is contained in:
mizoguch-ken 2017-09-18 15:06:12 +09:00 committed by nakarlsson
parent 3daefaea61
commit 1903d1ff54
2 changed files with 3 additions and 3 deletions

View File

@ -590,7 +590,7 @@ int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
/* if nothing received, clear buffer index status so it can be used again */
if (wkc <= EC_NOFRAME)
{
ec_setbufstat(idx, EC_BUF_EMPTY);
ecx_setbufstat(port, idx, EC_BUF_EMPTY);
}
return wkc;

View File

@ -86,7 +86,7 @@ int ecx_FOEread(ecx_contextt *context, uint16 slave, char *filename, uint32 pass
ec_clearmbx(&MbxOut);
aFOEp = (ec_FOEt *)&MbxIn;
FOEp = (ec_FOEt *)&MbxOut;
fnsize = strlen(filename);
fnsize = (uint16)strlen(filename);
maxdata = context->slavelist[slave].mbx_l - 12;
if (fnsize > maxdata)
{
@ -215,7 +215,7 @@ int ecx_FOEwrite(ecx_contextt *context, uint16 slave, char *filename, uint32 pas
aFOEp = (ec_FOEt *)&MbxIn;
FOEp = (ec_FOEt *)&MbxOut;
dofinalzero = FALSE;
fnsize = strlen(filename);
fnsize = (uint16)strlen(filename);
maxdata = context->slavelist[slave].mbx_l - 12;
if (fnsize > maxdata)
{