@@ -894,9 +894,8 @@ static bool _parseCopsRegModeToken( char * pToken,
894894 {
895895 if ( ( var >= 0 ) && ( var < ( int32_t ) REGISTRATION_MODE_MAX ) )
896896 {
897- /* Variable "var" is ensured that it is valid and within
898- * a valid range. Hence, assigning the value of the variable to
899- * networkRegMode with a enum cast. */
897+ /* MISRA Ref 10.5.1 [Essential type casting] */
898+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-105 */
900899 /* coverity[misra_c_2012_rule_10_5_violation] */
901900 pOperatorInfo -> networkRegMode = ( CellularNetworkRegistrationMode_t ) var ;
902901 }
@@ -934,9 +933,8 @@ static bool _parseCopsNetworkNameFormatToken( const char * pToken,
934933 if ( ( var >= 0 ) &&
935934 ( var < ( int32_t ) OPERATOR_NAME_FORMAT_MAX ) )
936935 {
937- /* Variable "var" is ensured that it is valid and within
938- * a valid range. Hence, assigning the value of the variable to
939- * operatorNameFormat with a enum cast. */
936+ /* MISRA Ref 10.5.1 [Essential type casting] */
937+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-105 */
940938 /* coverity[misra_c_2012_rule_10_5_violation] */
941939 pOperatorInfo -> operatorNameFormat = ( CellularOperatorNameFormat_t ) var ;
942940 }
@@ -1022,9 +1020,8 @@ static bool _parseCopsRatToken( const char * pToken,
10221020 {
10231021 if ( ( var < ( int32_t ) CELLULAR_RAT_MAX ) && ( var >= 0 ) )
10241022 {
1025- /* Variable "var" is ensured that it is valid and within
1026- * a valid range. Hence, assigning the value of the variable to
1027- * rat with a enum cast. */
1023+ /* MISRA Ref 10.5.1 [Essential type casting] */
1024+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-105 */
10281025 /* coverity[misra_c_2012_rule_10_5_violation] */
10291026 pOperatorInfo -> rat = ( CellularRat_t ) var ;
10301027 }
@@ -1697,8 +1694,8 @@ CellularError_t Cellular_CommonSetEidrxSettings( CellularHandle_t cellularHandle
16971694 {
16981695 /* Form the AT command. */
16991696
1700- /* The return value of snprintf is not used.
1701- * The max length of the string is fixed and checked offline. */
1697+ /* MISRA Ref 21.6.1 [Use of snprintf] */
1698+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-216 */
17021699 /* coverity[misra_c_2012_rule_21_6_violation]. */
17031700 ( void ) snprintf ( cmdBuf , CELLULAR_AT_CMD_MAX_SIZE , "%s%d,%d,\"" PRINTF_BINARY_PATTERN_INT4 "\"" ,
17041701 "AT+CEDRXS=" ,
@@ -2050,10 +2047,12 @@ CellularError_t Cellular_CommonGetIPAddress( CellularHandle_t cellularHandle,
20502047 {
20512048 /* Form the AT command. */
20522049
2053- /* The return value of snprintf is not used.
2054- * The max length of the string is fixed and checked offline. */
2050+
2051+ /* MISRA Ref 21.6.1 [Use of snprintf] */
2052+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-216 */
20552053 /* coverity[misra_c_2012_rule_21_6_violation]. */
20562054 ( void ) snprintf ( cmdBuf , CELLULAR_AT_CMD_TYPICAL_MAX_SIZE , "%s%d" , "AT+CGPADDR=" , contextId );
2055+
20572056 pktStatus = _Cellular_AtcmdRequestWithCallback ( pContext , atReqGetIp );
20582057
20592058 if ( pktStatus != CELLULAR_PKT_STATUS_OK )
@@ -2196,8 +2195,8 @@ CellularError_t Cellular_CommonSetPdnConfig( CellularHandle_t cellularHandle,
21962195 {
21972196 /* Form the AT command. */
21982197
2199- /* The return value of snprintf is not used.
2200- * The max length of the string is fixed and checked offline. */
2198+ /* MISRA Ref 21.6.1 [Use of snprintf] */
2199+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-216 */
22012200 /* coverity[misra_c_2012_rule_21_6_violation]. */
22022201 ( void ) snprintf ( cmdBuf , CELLULAR_AT_CMD_MAX_SIZE , "%s%d,\"%s\",\"%s\"" ,
22032202 "AT+CGDCONT=" ,
@@ -2782,16 +2781,16 @@ static uint32_t appendBinaryPattern( char * cmdBuf,
27822781
27832782 if ( value != 0U )
27842783 {
2785- /* The return value of snprintf is not used.
2786- * The max length of the string is fixed and checked offline. */
2784+ /* MISRA Ref 21.6.1 [Use of snprintf] */
2785+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-216 */
27872786 /* coverity[misra_c_2012_rule_21_6_violation]. */
27882787 ( void ) snprintf ( cmdBuf , cmdLen , "\"" PRINTF_BINARY_PATTERN_INT8 "\"%c" ,
27892788 PRINTF_BYTE_TO_BINARY_INT8 ( value ), endOfString ? '\0' : ',' );
27902789 }
27912790 else
27922791 {
2793- /* The return value of snprintf is not used.
2794- * The max length of the string is fixed and checked offline. */
2792+ /* MISRA Ref 21.6.1 [Use of snprintf] */
2793+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-216 */
27952794 /* coverity[misra_c_2012_rule_21_6_violation]. */
27962795 ( void ) snprintf ( cmdBuf , cmdLen , "%c" , endOfString ? '\0' : ',' );
27972796 }
@@ -2835,8 +2834,8 @@ CellularError_t Cellular_CommonSetPsmSettings( CellularHandle_t cellularHandle,
28352834 {
28362835 /* Form the AT command. */
28372836
2838- /* The return value of snprintf is not used.
2839- * The max length of the string is fixed and checked offline. */
2837+ /* MISRA Ref 21.6.1 [Use of snprintf] */
2838+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/blob/main/MISRA.md#rule-216 */
28402839 /* coverity[misra_c_2012_rule_21_6_violation]. */
28412840 ( void ) snprintf ( cmdBuf , CELLULAR_AT_CMD_MAX_SIZE , "AT+CPSMS=%d," , pPsmSettings -> mode );
28422841 cmdBufLen = ( uint32_t ) strlen ( cmdBuf );
0 commit comments