Skip to content

Commit

Permalink
Fixed un-used parameter and variable warnings for EoE (OpenEtherCATso…
Browse files Browse the repository at this point in the history
…ciety#248)

Trivial fix, no review
  • Loading branch information
nakarlsson authored Feb 1, 2019
1 parent 86a2584 commit 037a629
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions soem/ethercateoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ int ecx_EOEsend(ecx_contextt *context, uint16 slave, uint8 port, int psize, void
memcpy(EOEp->data, &buf[txframeoffset], txframesize);

/* send EoE request to slave */
wkc = ecx_mbxsend(context, slave, (ec_mbxbuft *)&MbxOut, EC_TIMEOUTTXM);
wkc = ecx_mbxsend(context, slave, (ec_mbxbuft *)&MbxOut, timeout);
if ((NotLast == TRUE) && (wkc > 0))
{
txframeoffset += txframesize;
Expand Down Expand Up @@ -453,9 +453,21 @@ int ecx_EOErecv(ecx_contextt *context, uint16 slave, uint8 port, int * psize, vo

if (rxfragmentno == 0)
{
rxframesize = (EOE_HDR_FRAME_OFFSET_GET(frameinfo2) << 5);
rxframeoffset = 0;
rxframeno = EOE_HDR_FRAME_NO_GET(frameinfo2);
rxframesize = (EOE_HDR_FRAME_OFFSET_GET(frameinfo2) << 5);
if (rxframesize > buffersize)
{
wkc = -EC_ERR_TYPE_EOE_INVALID_RX_DATA;
/* Exit here*/
break;
}
if (port != EOE_HDR_FRAME_PORT_GET(frameinfo1))
{
wkc = -EC_ERR_TYPE_EOE_INVALID_RX_DATA;
/* Exit here*/
break;
}
}
else
{
Expand Down

0 comments on commit 037a629

Please sign in to comment.