@@ -983,7 +983,7 @@ static bool _parseCopsNetworkNameToken( const char * pToken,
983983 {
984984 ( void ) strncpy ( pOperatorInfo -> plmnInfo .mcc , pToken , CELLULAR_MCC_MAX_SIZE );
985985 pOperatorInfo -> plmnInfo .mcc [ CELLULAR_MCC_MAX_SIZE ] = '\0' ;
986- ( void ) strncpy ( pOperatorInfo -> plmnInfo .mnc , & pToken [ CELLULAR_MCC_MAX_SIZE ],
986+ ( void ) strncpy ( pOperatorInfo -> plmnInfo .mnc , & ( pToken [ CELLULAR_MCC_MAX_SIZE ] ) ,
987987 ( uint32_t ) ( mccMncLen - CELLULAR_MCC_MAX_SIZE + 1u ) );
988988 pOperatorInfo -> plmnInfo .mnc [ CELLULAR_MNC_MAX_SIZE ] = '\0' ;
989989 }
@@ -1419,8 +1419,8 @@ static CellularError_t atcmdUpdateMccMnc( CellularContext_t * pContext,
14191419 CellularAtReq_t atCopsRequest = { 0 };
14201420
14211421 /* Set the response to numeric format. */
1422- atCopsRequest .pAtCmd = "AT+COPS=3,2" ,
1423- atCopsRequest .atCmdType = CELLULAR_AT_NO_RESULT ,
1422+ atCopsRequest .pAtCmd = "AT+COPS=3,2" ;
1423+ atCopsRequest .atCmdType = CELLULAR_AT_NO_RESULT ;
14241424 pktStatus = _Cellular_AtcmdRequestWithCallback ( pContext , atCopsRequest );
14251425
14261426 if ( pktStatus == CELLULAR_PKT_STATUS_OK )
@@ -1482,7 +1482,7 @@ static CellularError_t atcmdQueryRegStatus( CellularContext_t * pContext,
14821482 /* Get the service status from lib AT data. */
14831483 if ( cellularStatus == CELLULAR_SUCCESS )
14841484 {
1485- pLibAtData = & pContext -> libAtData ;
1485+ pLibAtData = & ( pContext -> libAtData ) ;
14861486 _Cellular_LockAtDataMutex ( pContext );
14871487 pServiceStatus -> rat = pLibAtData -> rat ;
14881488 pServiceStatus -> csRegistrationStatus = pLibAtData -> csRegStatus ;
@@ -1808,7 +1808,7 @@ CellularError_t Cellular_CommonGetRegisteredNetwork( CellularHandle_t cellularHa
18081808 }
18091809 else
18101810 {
1811- memset ( pOperatorInfo , 0 , sizeof ( cellularOperatorInfo_t ) );
1811+ ( void ) memset ( pOperatorInfo , 0 , sizeof ( cellularOperatorInfo_t ) );
18121812 cellularStatus = atcmdUpdateMccMnc ( pContext , pOperatorInfo );
18131813 }
18141814
@@ -2080,7 +2080,7 @@ void _Cellular_DestroyAtDataMutex( CellularContext_t * pContext )
20802080{
20812081 configASSERT ( pContext != NULL );
20822082
2083- PlatformMutex_Destroy ( & pContext -> libAtDataMutex );
2083+ PlatformMutex_Destroy ( & ( pContext -> libAtDataMutex ) );
20842084}
20852085
20862086/*-----------------------------------------------------------*/
@@ -2091,7 +2091,7 @@ bool _Cellular_CreateAtDataMutex( CellularContext_t * pContext )
20912091
20922092 configASSERT ( pContext != NULL );
20932093
2094- status = PlatformMutex_Create ( & pContext -> libAtDataMutex , false );
2094+ status = PlatformMutex_Create ( & ( pContext -> libAtDataMutex ) , false );
20952095
20962096 return status ;
20972097}
@@ -2102,7 +2102,7 @@ void _Cellular_LockAtDataMutex( CellularContext_t * pContext )
21022102{
21032103 configASSERT ( pContext != NULL );
21042104
2105- PlatformMutex_Lock ( & pContext -> libAtDataMutex );
2105+ PlatformMutex_Lock ( & ( pContext -> libAtDataMutex ) );
21062106}
21072107
21082108/*-----------------------------------------------------------*/
@@ -2111,7 +2111,7 @@ void _Cellular_UnlockAtDataMutex( CellularContext_t * pContext )
21112111{
21122112 configASSERT ( pContext != NULL );
21132113
2114- PlatformMutex_Unlock ( & pContext -> libAtDataMutex );
2114+ PlatformMutex_Unlock ( & ( pContext -> libAtDataMutex ) );
21152115}
21162116
21172117/*-----------------------------------------------------------*/
@@ -2125,7 +2125,7 @@ void _Cellular_InitAtData( CellularContext_t * pContext,
21252125
21262126 configASSERT ( pContext != NULL );
21272127
2128- pLibAtData = & pContext -> libAtData ;
2128+ pLibAtData = & ( pContext -> libAtData ) ;
21292129
21302130 if ( mode == 0u )
21312131 {
@@ -2667,14 +2667,7 @@ CellularError_t Cellular_CommonGetSimCardLockStatus( CellularHandle_t cellularHa
26672667 CellularContext_t * pContext = ( CellularContext_t * ) cellularHandle ;
26682668 CellularError_t cellularStatus = CELLULAR_SUCCESS ;
26692669 CellularPktStatus_t pktStatus = CELLULAR_PKT_STATUS_OK ;
2670- CellularAtReq_t atReqGetSimLockStatus = { 0 };
2671-
2672- atReqGetSimLockStatus .pAtCmd = "AT+CPIN?" ;
2673- atReqGetSimLockStatus .atCmdType = CELLULAR_AT_WITH_PREFIX ;
2674- atReqGetSimLockStatus .pAtRspPrefix = "+CPIN" ;
2675- atReqGetSimLockStatus .respCallback = _Cellular_RecvFuncGetSimLockStatus ;
2676- atReqGetSimLockStatus .pData = NULL ;
2677- atReqGetSimLockStatus .dataLen = 0 ;
2670+ CellularAtReq_t atReqGetSimLockStatus ;
26782671
26792672 /* pContext is checked in _Cellular_CheckLibraryStatus function. */
26802673 cellularStatus = _Cellular_CheckLibraryStatus ( pContext );
@@ -2693,7 +2686,11 @@ CellularError_t Cellular_CommonGetSimCardLockStatus( CellularHandle_t cellularHa
26932686 /* Initialize the sim state and the sim lock state. */
26942687 pSimCardStatus -> simCardLockState = CELLULAR_SIM_CARD_LOCK_UNKNOWN ;
26952688
2696- atReqGetSimLockStatus .pData = & pSimCardStatus -> simCardLockState ;
2689+ atReqGetSimLockStatus .pAtCmd = "AT+CPIN?" ;
2690+ atReqGetSimLockStatus .atCmdType = CELLULAR_AT_WITH_PREFIX ;
2691+ atReqGetSimLockStatus .pAtRspPrefix = "+CPIN" ;
2692+ atReqGetSimLockStatus .respCallback = _Cellular_RecvFuncGetSimLockStatus ;
2693+ atReqGetSimLockStatus .pData = & ( pSimCardStatus -> simCardLockState );
26972694 atReqGetSimLockStatus .dataLen = ( uint16_t ) sizeof ( CellularSimCardLockState_t );
26982695
26992696 pktStatus = _Cellular_AtcmdRequestWithCallback ( pContext , atReqGetSimLockStatus );
@@ -2740,7 +2737,7 @@ CellularError_t Cellular_CommonGetSimCardInfo( CellularHandle_t cellularHandle,
27402737 atReqGetHplmn .atCmdType = CELLULAR_AT_WITH_PREFIX ;
27412738 atReqGetHplmn .pAtRspPrefix = "+CRSM" ;
27422739 atReqGetHplmn .respCallback = _Cellular_RecvFuncGetHplmn ;
2743- atReqGetHplmn .pData = & pSimCardInfo -> plmn ;
2740+ atReqGetHplmn .pData = & ( pSimCardInfo -> plmn ) ;
27442741 atReqGetHplmn .dataLen = ( uint16_t ) sizeof ( CellularPlmnInfo_t );
27452742
27462743 /* pContext is checked in _Cellular_CheckLibraryStatus function. */
@@ -2856,13 +2853,13 @@ CellularError_t Cellular_CommonSetPsmSettings( CellularHandle_t cellularHandle,
28562853 /* coverity[misra_c_2012_rule_21_6_violation]. */
28572854 ( void ) snprintf ( cmdBuf , CELLULAR_AT_CMD_MAX_SIZE , "AT+CPSMS=%d," , pPsmSettings -> mode );
28582855 cmdBufLen = ( uint32_t ) strlen ( cmdBuf );
2859- cmdBufLen = cmdBufLen + appendBinaryPattern ( & cmdBuf [ cmdBufLen ], ( CELLULAR_AT_CMD_MAX_SIZE - cmdBufLen ),
2856+ cmdBufLen = cmdBufLen + appendBinaryPattern ( & ( cmdBuf [ cmdBufLen ] ) , ( CELLULAR_AT_CMD_MAX_SIZE - cmdBufLen ),
28602857 pPsmSettings -> periodicRauValue , false );
2861- cmdBufLen = cmdBufLen + appendBinaryPattern ( & cmdBuf [ cmdBufLen ], ( CELLULAR_AT_CMD_MAX_SIZE - cmdBufLen ),
2858+ cmdBufLen = cmdBufLen + appendBinaryPattern ( & ( cmdBuf [ cmdBufLen ] ) , ( CELLULAR_AT_CMD_MAX_SIZE - cmdBufLen ),
28622859 pPsmSettings -> gprsReadyTimer , false );
2863- cmdBufLen = cmdBufLen + appendBinaryPattern ( & cmdBuf [ cmdBufLen ], ( CELLULAR_AT_CMD_MAX_SIZE - cmdBufLen ),
2860+ cmdBufLen = cmdBufLen + appendBinaryPattern ( & ( cmdBuf [ cmdBufLen ] ) , ( CELLULAR_AT_CMD_MAX_SIZE - cmdBufLen ),
28642861 pPsmSettings -> periodicTauValue , false );
2865- ( void ) appendBinaryPattern ( & cmdBuf [ cmdBufLen ], ( CELLULAR_AT_CMD_MAX_SIZE - cmdBufLen ),
2862+ ( void ) appendBinaryPattern ( & ( cmdBuf [ cmdBufLen ] ) , ( CELLULAR_AT_CMD_MAX_SIZE - cmdBufLen ),
28662863 pPsmSettings -> activeTimeValue , true );
28672864
28682865 LogDebug ( ( "PSM setting: %s " , cmdBuf ) );
@@ -2919,19 +2916,19 @@ static CellularATError_t parseGetPsmToken( char * pToken,
29192916 break ;
29202917
29212918 case CPSMS_POS_RAU :
2922- atCoreStatus = parseT3412TimerValue ( pToken , & pPsmSettings -> periodicRauValue );
2919+ atCoreStatus = parseT3412TimerValue ( pToken , & ( pPsmSettings -> periodicRauValue ) );
29232920 break ;
29242921
29252922 case CPSMS_POS_RDY_TIMER :
2926- atCoreStatus = parseT3324TimerValue ( pToken , & pPsmSettings -> gprsReadyTimer );
2923+ atCoreStatus = parseT3324TimerValue ( pToken , & ( pPsmSettings -> gprsReadyTimer ) );
29272924 break ;
29282925
29292926 case CPSMS_POS_TAU :
2930- atCoreStatus = parseT3412TimerValue ( pToken , & pPsmSettings -> periodicTauValue );
2927+ atCoreStatus = parseT3412TimerValue ( pToken , & ( pPsmSettings -> periodicTauValue ) );
29312928 break ;
29322929
29332930 case CPSMS_POS_ACTIVE_TIME :
2934- atCoreStatus = parseT3324TimerValue ( pToken , & pPsmSettings -> activeTimeValue );
2931+ atCoreStatus = parseT3324TimerValue ( pToken , & ( pPsmSettings -> activeTimeValue ) );
29352932 break ;
29362933
29372934 default :
0 commit comments