From 1903d1ff543257429aed4488907f525f967babc9 Mon Sep 17 00:00:00 2001 From: mizoguch-ken <31312266+mizoguch-ken@users.noreply.github.com> Date: Mon, 18 Sep 2017 15:06:12 +0900 Subject: [PATCH] fix warnings and fix error (#128) --- oshw/win32/nicdrv.c | 2 +- soem/ethercatfoe.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oshw/win32/nicdrv.c b/oshw/win32/nicdrv.c index f7050e3..4e9acda 100644 --- a/oshw/win32/nicdrv.c +++ b/oshw/win32/nicdrv.c @@ -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; diff --git a/soem/ethercatfoe.c b/soem/ethercatfoe.c index fddbde2..e866f5c 100644 --- a/soem/ethercatfoe.c +++ b/soem/ethercatfoe.c @@ -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) {