Commit 42bd9348 authored by Wolfgang Seiss's avatar Wolfgang Seiss

[FIX] Add missing type casts to avoid warnings on 64 bit systems

Add missing type casts in order to comply with different bit sizes
of the target system (e.g. 64 bit) in the following modules:
- pdou
- event*cal
- obdu

Change-Id: Ia9830373fa60767dee34b89fc97e5efae8880d7d
parent 8a48f7cd
......@@ -313,7 +313,7 @@ tOplkError eventkcal_processEventCircbuf(tEventQueue eventQueue_p)
return kErrorGeneralError;
}
pEvent = (tEvent*)aRxBuffer_l[eventQueue_p];
pEvent->eventArgSize = (readSize - sizeof(tEvent));
pEvent->eventArgSize = (UINT)(readSize - sizeof(tEvent));
if (pEvent->eventArgSize > 0)
pEvent->eventArg.pEventArg = &aRxBuffer_l[eventQueue_p][sizeof(tEvent)];
......
......@@ -289,7 +289,7 @@ tOplkError eventucal_processEventCircbuf(tEventQueue eventQueue_p)
}
pEvent = (tEvent*)aRxBuffer;
pEvent->eventArgSize = (readSize - sizeof(tEvent));
pEvent->eventArgSize = (UINT)(readSize - sizeof(tEvent));
if (pEvent->eventArgSize > 0)
pEvent->eventArg.pEventArg = &aRxBuffer[sizeof(tEvent)];
......
......@@ -2140,7 +2140,7 @@ static tObdSize getObjectSize(const tObdSubEntry* pSubIndexEntry_p)
return 0;
if (dataTypeSize_l[pSubIndexEntry_p->type].pfnGetObjSize == NULL)
return dataTypeSize_l[pSubIndexEntry_p->type].size;
return (tObdSize)dataTypeSize_l[pSubIndexEntry_p->type].size;
else
return dataTypeSize_l[pSubIndexEntry_p->type].pfnGetObjSize((tObdSubEntry*)pSubIndexEntry_p);
}
......
......@@ -206,9 +206,9 @@ static tOplkError getMaxPdoSize(BYTE nodeId_p,
UINT16* pMaxPdoSize_p,
UINT32* pAbortCode_p);
static tOplkError getPdoChannelId(UINT pdoId_p, BOOL fTxPdo_p, UINT* pChannelId_p);
static UINT calcPdoMemSize(const tPdoChannelSetup* pPdoChannels_p,
size_t* pRxPdoMemSize_p,
size_t* pTxPdoMemSize_p);
static size_t calcPdoMemSize(const tPdoChannelSetup* pPdoChannels_p,
size_t* pRxPdoMemSize_p,
size_t* pTxPdoMemSize_p);
static tOplkError copyVarToPdo(BYTE* pPayload_p,
const tPdoMappObject* pMappObject_p,
UINT16 offsetInFrame_p);
......@@ -1960,9 +1960,9 @@ The function calculates the size needed for the PDO memory.
\return The function returns the size of the used PDO memory
*/
//------------------------------------------------------------------------------
static UINT calcPdoMemSize(const tPdoChannelSetup* pPdoChannels_p,
size_t* pRxPdoMemSize_p,
size_t* pTxPdoMemSize_p)
static size_t calcPdoMemSize(const tPdoChannelSetup* pPdoChannels_p,
size_t* pRxPdoMemSize_p,
size_t* pTxPdoMemSize_p)
{
UINT channelId;
size_t rxSize;
......
......@@ -203,8 +203,8 @@ tOplkError pdoucal_postSetupPdoBuffers(size_t rxPdoMemSize_p,
tEvent event;
tPdoMemSize pdoMemSize;
pdoMemSize.rxPdoMemSize = rxPdoMemSize_p;
pdoMemSize.txPdoMemSize = txPdoMemSize_p;
pdoMemSize.rxPdoMemSize = (UINT32)rxPdoMemSize_p;
pdoMemSize.txPdoMemSize = (UINT32)txPdoMemSize_p;
event.eventSink = kEventSinkPdokCal;
event.eventType = kEventTypePdokSetupPdoBuf;
event.eventArg.pEventArg = &pdoMemSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment