diff --git a/source/cellular_3gpp_api.c b/source/cellular_3gpp_api.c index feecbc6c..37c6d80b 100644 --- a/source/cellular_3gpp_api.c +++ b/source/cellular_3gpp_api.c @@ -489,7 +489,7 @@ static CellularPktStatus_t _parseTimeZoneInfo( char * pTimeZoneResp, if( pktStatus == CELLULAR_PKT_STATUS_OK ) { - LogDebug( ( "TimeZoneInfo: Timezone %d Year %d Month %d day %d,", pTimeInfo->timeZone, + LogDebug( ( "TimeZoneInfo: Timezone %ld Year %d Month %d day %d,", pTimeInfo->timeZone, pTimeInfo->year, pTimeInfo->month, pTimeInfo->day ) ); diff --git a/source/cellular_common.c b/source/cellular_common.c index eede0608..50706d30 100644 --- a/source/cellular_common.c +++ b/source/cellular_common.c @@ -599,7 +599,7 @@ CellularError_t _Cellular_RemoveSocketData( CellularContext_t * pContext, if( socketHandle->socketState == SOCKETSTATE_CONNECTING ) { - LogWarn( ( "_Cellular_RemoveSocket, socket is connecting state [%u]", socketHandle->socketId ) ); + LogWarn( ( "_Cellular_RemoveSocket, socket is connecting state [%lu]", socketHandle->socketId ) ); } taskENTER_CRITICAL(); @@ -652,7 +652,7 @@ CellularError_t _Cellular_IsValidSocket( const CellularContext_t * pContext, { if( ( sockIndex >= CELLULAR_NUM_SOCKET_MAX ) || ( pContext->pSocketData[ sockIndex ] == NULL ) ) { - LogError( ( "_Cellular_IsValidSocket, invalid socket handle %u", sockIndex ) ); + LogError( ( "_Cellular_IsValidSocket, invalid socket handle %lu", sockIndex ) ); cellularStatus = CELLULAR_BAD_PARAMETER; } } @@ -916,7 +916,7 @@ CellularSocketContext_t * _Cellular_GetSocketData( const CellularContext_t * pCo { if( ( sockIndex >= CELLULAR_NUM_SOCKET_MAX ) || ( pContext->pSocketData[ sockIndex ] == NULL ) ) { - LogError( ( "_Cellular_GetSocketData, invalid socket handle %u", sockIndex ) ); + LogError( ( "_Cellular_GetSocketData, invalid socket handle %lu", sockIndex ) ); } else { diff --git a/source/cellular_common_api.c b/source/cellular_common_api.c index 43a67bf0..339a1574 100644 --- a/source/cellular_common_api.c +++ b/source/cellular_common_api.c @@ -107,7 +107,7 @@ static CellularError_t _socketSetSockOptLevelTransport( CellularSocketOption_t o } else { - LogError( ( "Cellular_SocketSetSockOpt: Cannot change the contextID in this state %d or length %d is invalid.", + LogError( ( "Cellular_SocketSetSockOpt: Cannot change the contextID in this state %d or length %lu is invalid.", socketHandle->socketState, optionValueLength ) ); cellularStatus = CELLULAR_INTERNAL_FAILURE; } @@ -123,7 +123,7 @@ static CellularError_t _socketSetSockOptLevelTransport( CellularSocketOption_t o } else { - LogError( ( "Cellular_SocketSetSockOpt: Cannot change the localPort in this state %d or length %d is invalid.", + LogError( ( "Cellular_SocketSetSockOpt: Cannot change the localPort in this state %d or length %lu is invalid.", socketHandle->socketState, optionValueLength ) ); cellularStatus = CELLULAR_INTERNAL_FAILURE; } diff --git a/source/cellular_pkthandler.c b/source/cellular_pkthandler.c index a87433bd..69c08015 100644 --- a/source/cellular_pkthandler.c +++ b/source/cellular_pkthandler.c @@ -820,7 +820,7 @@ CellularPktStatus_t _Cellular_AtParseInit( const CellularContext_t * pContext ) if( result >= 0 ) { - LogError( ( "AtParseFail for %u: %d %s %s", i, result, + LogError( ( "AtParseFail for %lu: %ld %s %s", i, result, pTokenMap[ i ].pStrValue, pTokenMap[ i + 1U ].pStrValue ) ); finit = false; } @@ -836,7 +836,7 @@ CellularPktStatus_t _Cellular_AtParseInit( const CellularContext_t * pContext ) for( i = 0; i < tokenMapSize; i++ ) { - LogDebug( ( "Callbacks setup for %u : %s", i, pTokenMap[ i ].pStrValue ) ); + LogDebug( ( "Callbacks setup for %lu : %s", i, pTokenMap[ i ].pStrValue ) ); } } else diff --git a/source/cellular_pktio.c b/source/cellular_pktio.c index 1d7dbfb3..43466b61 100644 --- a/source/cellular_pktio.c +++ b/source/cellular_pktio.c @@ -142,7 +142,7 @@ static void _saveData( char * pLine, ( void ) dataLen; - LogDebug( ( "_saveData : Save data %p with length %d", pLine, dataLen ) ); + LogDebug( ( "_saveData : Save data %p with length %lu", pLine, dataLen ) ); pNew = ( CellularATCommandLine_t * ) Platform_Malloc( sizeof( CellularATCommandLine_t ) ); configASSERT( ( pNew != NULL ) ); @@ -174,7 +174,7 @@ static void _saveRawData( char * pLine, CellularATCommandResponse_t * pResp, uint32_t dataLen ) { - LogDebug( ( "Save [%p] %d data to pResp", pLine, dataLen ) ); + LogDebug( ( "Save [%p] %lu data to pResp", pLine, dataLen ) ); _saveData( pLine, pResp, dataLen ); } @@ -183,7 +183,7 @@ static void _saveRawData( char * pLine, static void _saveATData( char * pLine, CellularATCommandResponse_t * pResp ) { - LogDebug( ( "Save [%s] %lu AT data to pResp", pLine, strlen( pLine ) ) ); + LogDebug( ( "Save [%s] %u AT data to pResp", pLine, strlen( pLine ) ) ); _saveData( pLine, pResp, ( uint32_t ) ( strlen( pLine ) + 1U ) ); } @@ -546,7 +546,7 @@ static char * _handleLeftoverBuffer( CellularContext_t * pContext ) /* Move the leftover data or AT command response to the start of buffer. * Set the pRead pointer to the empty buffer space. */ - LogDebug( ( "moved the partial line/data from %p to %p %d", + LogDebug( ( "moved the partial line/data from %p to %p %lu", pContext->pPktioReadPtr, pContext->pktioReadBuf, pContext->partialDataRcvdLen ) ); ( void ) memmove( pContext->pktioReadBuf, pContext->pPktioReadPtr, pContext->partialDataRcvdLen ); @@ -617,7 +617,7 @@ static char * _Cellular_ReadLine( CellularContext_t * pContext, /* Add a NULL after the bytesRead. This is required for further processing. */ pRead[ bytesRead ] = '\0'; - LogDebug( ( "AT Read %d bytes, data[%p]", bytesRead, pRead ) ); + LogDebug( ( "AT Read %lu bytes, data[%p]", bytesRead, pRead ) ); /* Set the pBytesRead only when actual bytes read from comm interface. */ *pBytesRead = bytesRead + partialDataRead; @@ -670,7 +670,7 @@ static CellularPktStatus_t _handleData( char * pStartOfData, /* There are more bytes after the data. */ *pBytesLeft = ( bytesDataAndLeft - pContext->dataLength ); - LogDebug( ( "_handleData : read buffer buffer %p start %p prefix %d left %d, read total %d", + LogDebug( ( "_handleData : read buffer buffer %p start %p prefix %lu left %lu, read total %lu", pContext->pktioReadBuf, pStartOfData, bytesBeforeData, @@ -885,7 +885,7 @@ static bool _preprocessInputBuffer( CellularContext_t * pContext, else if( bufferLength > *pBytesRead ) { /* The input buffer callback returns incorrect buffer length. */ - LogError( ( "Input buffer callback returns bufferLength %u. Modem returns length %u. Clean the read buffer.", + LogError( ( "Input buffer callback returns bufferLength %lu. Modem returns length %lu. Clean the read buffer.", bufferLength, *pBytesRead ) ); /* Clean the read buffer and read pointer. */ @@ -1026,7 +1026,7 @@ static bool _handleDataResult( CellularContext_t * pContext, else { *pBytesRead = bytesLeft; - LogDebug( ( "_handleData okay, keep processing %u bytes %p", bytesLeft, *ppLine ) ); + LogDebug( ( "_handleData okay, keep processing %lu bytes %p", bytesLeft, *ppLine ) ); } return keepProcess; @@ -1427,7 +1427,7 @@ uint32_t _Cellular_PktioSendData( CellularContext_t * pContext, dataLen, CELLULAR_COMM_IF_SEND_TIMEOUT_MS, &sentLen ); } - LogDebug( ( "PktioSendData sent %d bytes", sentLen ) ); + LogDebug( ( "PktioSendData sent %lu bytes", sentLen ) ); return sentLen; }