}\r
\r
\r
-boolean DspCheckSessionLevel(const Dcm_DspSessionRowType **sessionLevelRefTable)\r
+boolean DspCheckSessionLevel(Dcm_DspSessionRowType const* const* sessionLevelRefTable)\r
{\r
- boolean returnStatus = TRUE;\r
+ Std_ReturnType returnStatus;\r
+ boolean levelFound = FALSE;\r
Dcm_SesCtrlType currentSession;\r
\r
- DslGetSesCtrlType(¤tSession);\r
- while ( ((*sessionLevelRefTable)->DspSessionLevel != currentSession) && (!(*sessionLevelRefTable)->Arc_EOL) ) {\r
- sessionLevelRefTable++;\r
- }\r
+ returnStatus = DslGetSesCtrlType(¤tSession);\r
+ if (returnStatus == E_OK) {\r
+ while ( ((*sessionLevelRefTable)->DspSessionLevel != currentSession) && (!(*sessionLevelRefTable)->Arc_EOL) ) {\r
+ sessionLevelRefTable++;\r
+ }\r
\r
- if ((*sessionLevelRefTable)->Arc_EOL) {\r
- returnStatus = FALSE;\r
+ if (!(*sessionLevelRefTable)->Arc_EOL) {\r
+ levelFound = TRUE;\r
+ }\r
}\r
\r
- return returnStatus;\r
+ return levelFound;\r
}\r
\r
\r
-boolean DspCheckSecurityLevel(const Dcm_DspSecurityRowType **securityLevelRefTable)\r
+boolean DspCheckSecurityLevel(Dcm_DspSecurityRowType const* const* securityLevelRefTable)\r
{\r
- boolean returnStatus = TRUE;\r
+ Std_ReturnType returnStatus;\r
+ boolean levelFound = FALSE;\r
Dcm_SecLevelType currentSecurityLevel;\r
\r
- DslGetSecurityLevel(¤tSecurityLevel);\r
- while ( ((*securityLevelRefTable)->DspSecurityLevel != currentSecurityLevel) && (!(*securityLevelRefTable)->Arc_EOL) ) {\r
- securityLevelRefTable++;\r
- }\r
- if ((*securityLevelRefTable)->Arc_EOL) {\r
- returnStatus = FALSE;\r
+ returnStatus = DslGetSecurityLevel(¤tSecurityLevel);\r
+ if (returnStatus == E_OK) {\r
+ while ( ((*securityLevelRefTable)->DspSecurityLevel != currentSecurityLevel) && (!(*securityLevelRefTable)->Arc_EOL) ) {\r
+ securityLevelRefTable++;\r
+ }\r
+ if (!(*securityLevelRefTable)->Arc_EOL) {\r
+ levelFound = TRUE;\r
+ }\r
}\r
\r
- return returnStatus;\r
+ return levelFound;\r
}\r
\r
\r
Dem_ReturnGetNumberOfFilteredDTCType getNumerResult;\r
uint16 numberOfFilteredDtc;\r
uint8 dtcStatusMask;\r
+ //lint -e826 PC-Lint exception - Suspicious pointer conversion\r
+ //lint -e927 PC-Lint exception - Pointer to pointer cast\r
TxDataType *txData = (TxDataType*)pduTxData->SduDataPtr;\r
\r
/** @req DCM376 */\r
\r
if (setDtcFilterResult == DEM_FILTER_ACCEPTED) {\r
uint8 dtcStatusMask;\r
+ //lint -e826 PC-Lint exception - Suspicious pointer conversion\r
+ //lint -e927 PC-Lint exception - Pointer to pointer cast\r
TxDataType *txData = (TxDataType*)pduTxData->SduDataPtr;\r
Dem_ReturnGetNextFilteredDTCType getNextFilteredDtcResult;\r
uint32 dtc;\r
responseCode = DCM_E_REQUESTOUTOFRANGE;\r
}\r
}\r
- pduTxData->SduLength = 3 + (nrOfDtcs * sizeof(dtcAndStatusRecordType));\r
+ pduTxData->SduLength = (PduLengthType)(3 + (nrOfDtcs * sizeof(dtcAndStatusRecordType)));\r
}\r
else {\r
responseCode = DCM_E_REQUESTOUTOFRANGE;\r
}\r
\r
// PC-Lint (715 etc): Remove errors until function is filled.\r
-//lint -save -e*\r
+//lint -save -e715 -e838 -e818 Symbol not referenced, responseCode not used, txData should be const\r
static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x08(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
\r
\r
// PC-Lint (715 etc): Remove errors until function is filled.\r
-//lint -save -e*\r
+//lint -save -e715 -e838 -e818 Symbol not referenced, responseCode not used, txData should be const\r
static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x09(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
getStatusOfDtcResult = Dem_GetStatusOfDTC(dtc, DEM_DTC_KIND_ALL_DTCS, dtcOrigin, &statusOfDtc); /** @req DCM295 */ /** @req DCM475 */\r
if (getStatusOfDtcResult == DEM_STATUS_OK) {\r
Dem_ReturnGetExtendedDataRecordByDTCType getExtendedDataRecordByDtcResult;\r
- uint16 recNum;\r
+ uint8 recNum;\r
uint16 recLength;\r
uint16 txIndex = 6;\r
\r
\r
\r
// PC-Lint (715 etc): Remove errors until function is filled.\r
-//lint -save -e*\r
+//lint -save -e715 -e838 -e818 Symbol not referenced, responseCode not used, txData should be const\r
static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x03(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
\r
\r
// PC-Lint (715 etc): Remove errors until function is filled.\r
-//lint -save -e*\r
+//lint -save -e715 -e838 -e818 Symbol not referenced, responseCode not used, txData should be const\r
static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x04(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
\r
\r
// PC-Lint (715 etc): Remove errors until function is filled.\r
-//lint -save -e*\r
+//lint -save -e715 -e838 -e818 Symbol not referenced, responseCode not used, txData should be const\r
static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x05(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
\r
\r
// PC-Lint (715 etc): Remove errors until function is filled.\r
-//lint -save -e*\r
+//lint -save -e715 -e838 -e818 Symbol not referenced, responseCode not used, txData should be const\r
static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x0B_0x0C_0x0D_0x0E(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
\r
\r
// PC-Lint (715 etc): Remove errors until function is filled.\r
-//lint -save -e*\r
+//lint -save -e715 -e838 -e818 Symbol not referenced, responseCode not used, txData should be const\r
static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x14(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
if ((*txPos + didLen + 2) <= pduTxData->SduLength) {\r
pduTxData->SduDataPtr[*txPos] = (didPtr->DspDidIdentifier >> 8) & 0xFFu;\r
(*txPos)++;\r
- pduTxData->SduDataPtr[*txPos] = (didPtr->DspDidIdentifier >> 0) & 0xFFu;\r
+ pduTxData->SduDataPtr[*txPos] = didPtr->DspDidIdentifier & 0xFFu;\r
(*txPos)++;\r
result = didPtr->DspDidReadDataFnc(&pduTxData->SduDataPtr[*txPos]); /** @req DCM437 */\r
*txPos += didLen;\r
{\r
/** @req DCM253 */\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
- uint8 nrOfDids;\r
+ uint16 nrOfDids;\r
uint16 didNr;\r
const Dcm_DspDidType *didPtr = NULL;\r
\r
\r
pduTxData->SduDataPtr[*txPos] = (didPtr->DspDidIdentifier >> 8) & 0xFFu;\r
(*txPos)++;\r
- pduTxData->SduDataPtr[*txPos] = (didPtr->DspDidIdentifier >> 0) & 0xFFu;\r
+ pduTxData->SduDataPtr[*txPos] = didPtr->DspDidIdentifier & 0xFFu;\r
(*txPos)++;\r
result = didPtr->DspDidGetScalingInfoFnc(&pduTxData->SduDataPtr[*txPos], &errorCode); /** @req DCM394 */\r
*txPos += scalingInfoLen;\r
\r
if (result == E_OK) {\r
if (didLen == writeDidLen) { /** @req DCM473 */\r
- result = didPtr->DspDidWriteDataFnc(&pduRxData->SduDataPtr[3], didLen, &errorCode); /** @req DCM395 */\r
+ result = didPtr->DspDidWriteDataFnc(&pduRxData->SduDataPtr[3], (uint8)didLen, &errorCode); /** @req DCM395 */\r
if ((result != E_OK) || (errorCode != DCM_E_POSITIVERESPONSE)) {\r
responseCode = DCM_E_CONDITIONSNOTCORRECT;\r
}\r
if (responseCode == DCM_E_POSITIVERESPONSE) {\r
pduTxData->SduLength = 3;\r
pduTxData->SduDataPtr[1] = (didNr >> 8) & 0xFFu;\r
- pduTxData->SduDataPtr[2] = (didNr >> 0) & 0xFFu;\r
+ pduTxData->SduDataPtr[2] = didNr & 0xFFu;\r
}\r
\r
DsdDspProcessingDone(responseCode);\r