Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Jan 12, 2020
1 parent 745ff04 commit 6afb943
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/xcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,6 @@ void Xcp_DispatchCommand(Xcp_PDUType const * const pdu)
/*DBG_PRINT2("CMD: [%02X]\n", cmd); */

if (Xcp_IsBusy()) {
printf("\n\t\t!!! BUSY !!!\n\n");
Xcp_BusyResponse();
return;
} else {
Expand Down Expand Up @@ -1691,7 +1690,7 @@ static void Xcp_GetDaqListInfo_Res(Xcp_PDUType const * const pdu)
const XcpDaq_ListIntegerType daqListNumber = (XcpDaq_ListIntegerType)Xcp_GetWord(pdu, UINT8(2));
XcpDaq_ListConfigurationType const * listConf;
XcpDaq_ListStateType * listState;
uint8_t properties;
uint8_t properties = (uint8_t)0x00;

DBG_PRINT2("GET_DAQ_LIST_INFO [daq: %u] \n", daqListNumber);
XCP_ASSERT_PGM_IDLE();
Expand Down
14 changes: 7 additions & 7 deletions src/xcp_daq.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ void XcpDaq_TriggerEvent(uint8_t eventChannelNumber)
XcpDaq_ODTIntegerType odtIdx;
XcpDaq_ODTIntegerType pid;
XcpDaq_ODTEntryIntegerType odtEntryIdx;
XcpDaq_ODTType * odt;
XcpDaq_ODTType const * odt;
XcpDaq_ODTEntryType * entry;
XcpDaq_ListConfigurationType const * listConf;

Expand Down Expand Up @@ -510,15 +510,15 @@ bool XcpDaq_EnqueueMessage(XcpDaq_MessageType const * msg)
XcpDaq_DtoBufferState.back += UINT16(1);
--lhs;
if ((lhs > UINT16(0)) && (lhs)) {
XcpUtl_MemCopy(&XcpDaq_DtoBuffer + XcpDaq_DtoBufferState.back, msg->data, lhs);
XcpUtl_MemCopy(&XcpDaq_DtoBuffer + XcpDaq_DtoBufferState.back, (void *)msg->data, lhs);
XcpDaq_DtoBufferState.back += lhs;
}
XcpUtl_MemCopy(&XcpDaq_DtoBuffer, msg->data, rhs);
XcpUtl_MemCopy(&XcpDaq_DtoBuffer, (void *)msg->data, rhs);
XcpDaq_DtoBufferState.back = rhs;
} else {
XcpDaq_DtoBuffer[XcpDaq_DtoBufferState.back] = msg->dlc;
XcpDaq_DtoBufferState.back += UINT16(1);
XcpUtl_MemCopy(&XcpDaq_DtoBuffer + XcpDaq_DtoBufferState.back, msg->data, msg->dlc);
XcpUtl_MemCopy(&XcpDaq_DtoBuffer + XcpDaq_DtoBufferState.back, (void *)msg->data, msg->dlc);
XcpDaq_DtoBufferState.back = (XcpDaq_DtoBufferState.back + msg->dlc) % UINT16(XCP_DAQ_DTO_BUFFER_SIZE);
}
XcpDaq_DtoBufferState.allocated += XCP_DAQ_MESSAGE_SIZE(msg);
Expand Down Expand Up @@ -550,15 +550,15 @@ bool XcpDaq_DequeueMessage(XcpDaq_MessageType * msg)
XcpDaq_DtoBufferState.front += UINT16(1);
--lhs;
if ((lhs > UINT16(0)) && (lhs)) {
XcpUtl_MemCopy(msg->data, &XcpDaq_DtoBuffer + XcpDaq_DtoBufferState.front, lhs);
XcpUtl_MemCopy((void *)msg->data, &XcpDaq_DtoBuffer + XcpDaq_DtoBufferState.front, lhs);
XcpDaq_DtoBufferState.front += lhs;
}
XcpUtl_MemCopy(msg->data, &XcpDaq_DtoBuffer, rhs);
XcpUtl_MemCopy((void *)msg->data, &XcpDaq_DtoBuffer, rhs);
XcpDaq_DtoBufferState.front = rhs;
} else {
msg-> dlc = XcpDaq_DtoBuffer[XcpDaq_DtoBufferState.front];
XcpDaq_DtoBufferState.front += UINT16(1);
XcpUtl_MemCopy(msg->data, &XcpDaq_DtoBuffer + XcpDaq_DtoBufferState.front, msg->dlc);
XcpUtl_MemCopy((void *)msg->data, &XcpDaq_DtoBuffer + XcpDaq_DtoBufferState.front, msg->dlc);
XcpDaq_DtoBufferState.front = (XcpDaq_DtoBufferState.front + msg->dlc) % UINT16(XCP_DAQ_DTO_BUFFER_SIZE);
}
XcpDaq_DtoBufferState.allocated -= XCP_DAQ_MESSAGE_SIZE(msg);
Expand Down

0 comments on commit 6afb943

Please sign in to comment.