summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian DC <radian.dc@gmail.com>2018-03-09 23:05:25 +0100
committerAdrian DC <radian.dc@gmail.com>2018-03-18 11:33:23 +0100
commite4fb0694ac4eb888f098598bd895587b71747ce5 (patch)
treec4b006ec6a508a2c85252bb22986db194c472175
parent978e1ce3fc660546a6e0b4432e2af95e1621ce82 (diff)
downloadandroid_external_libnfc-nxp-lineage-16.0.tar.gz
android_external_libnfc-nxp-lineage-16.0.tar.bz2
android_external_libnfc-nxp-lineage-16.0.zip
nxp: Resolve unused variables and errorslineage-17.1lineage-17.0lineage-16.0lineage-15.1
* src/phLibNfc_llcp.c:74:22: error: comparison between pointer and integer * src/phLibNfc_discovery.c:369:27: error: variable 'response' used in loop condition not modified in loop body * src/phLibNfc_initiator.c:328:20: error: explicitly assigning value of variable of type 'NFCSTATUS' * src/phFriNfc_Llcp.c: 843:37: error: unused variable 'sHeader' 927:1: error: unused label 'clean_and_return' * src/phFriNfc_LlcpTransport.c: 1807:12: error: unused variable 'i' 1897:12: error: unused variable 'i' * src/phFriNfc_LlcpTransport_Connection.c: 50:39: error: unused variable 'psLocalLlcpSocket' 51:38: error: unused variable 'sFrmrBuffer' 52:38: error: unused variable 'index' 53:38: error: unused variable 'socketFound' 1612:14: error: unused variable 'index' * src/phFriNfc_LlcpTransport_Connectionless.c: 135:46: error: unused variable 'pSavedContext' * src/phFriNfc_MifareStdMap.c: 3750:51: error: equality comparison with extraneous parentheses * src/phFriNfc_MifareULMap.c:3062:51: error: equality comparison with extraneous parentheses * src/phFriNfc_TopazMap.c: 280:33, 364:33, 446:33, 929:33, 958:33, 996:33, 1089:29, 1173:33: error: implicit conversion from enumeration type 'enum phHal_eJewelCmdList' * src/phFriNfc_FelicaMap.c: 770:27, 980:31, 1178:27, 2098:27, 2170:27, 2733:27: error: implicit conversion from enumeration type 'enum phHal_eJewelCmdList' 2249:33: error: ordered comparison between pointer and integer * src/phFriNfc_DesfireMap.c:1185:35: error: equality comparison with extraneous parentheses * src/phFriNfc_TopazDynamicMap.c:1816:31, 1970:31: error: implicit conversion from enumeration type 'enum phHal_eJewelCmdList' * src/phFriNfc_DesfireFormat.c:694:75, 714:33, 783:33: error: equality comparison with extraneous parentheses * src/phFriNfc_ISO15693Format.c:547:38: error: unused variable 'ps_iso15693_info' * src/phFriNfc_OvrHal.c:338:28, 403:29: error: explicitly assigning value of variable of type 'phHal_sRemoteDevInformation_t *' to itself * Linux_x86/phDal4Nfc.c: 293:11: error: unused variable pThreadReturn 539:12: error: unused variable num_eeprom_settings 540:13: error: unused variable eeprom_settings 708:15: error: unused variable retvalue 709:15: error: unused variable result 710:15: error: unused variable retry_cnt 718:9: error: unused variable i 836:20: error: unused variable nReadThreadAttributes 837:20: error: unused variable nWriteThreadAttributes 914:13: error: unused variable i * src/phFriNfc_NdefRecord.c: 229:18: error: implicit declaration of function 'phFriNfc_NdefRecord_RecordIDCheck' 492:25: error: implicit declaration of function 'phFriNfc_NdefRecord_RecordFlag' 496:15: error: implicit declaration of function 'phFriNfc_NdefRecord_TypeNameFormat' Change-Id: I181bd41dcb0ca8071cc2a4ce4b4d46c99e1775f9
-rw-r--r--Linux_x86/phDal4Nfc.c10
-rw-r--r--inc/phNfcTypes.h2
-rwxr-xr-xsrc/phDnldNfc.c33
-rw-r--r--src/phFriNfc_DesfireFormat.c12
-rw-r--r--src/phFriNfc_DesfireMap.c2
-rw-r--r--src/phFriNfc_FelicaMap.c14
-rw-r--r--src/phFriNfc_ISO15693Format.c2
-rw-r--r--src/phFriNfc_Llcp.c3
-rw-r--r--src/phFriNfc_LlcpTransport.c2
-rw-r--r--src/phFriNfc_LlcpTransport_Connection.c5
-rw-r--r--src/phFriNfc_LlcpTransport_Connectionless.c1
-rw-r--r--src/phFriNfc_MifareStdMap.c4
-rw-r--r--src/phFriNfc_MifareULMap.c8
-rw-r--r--src/phFriNfc_NdefRecord.c9
-rw-r--r--src/phFriNfc_NdefRecord.h52
-rw-r--r--src/phFriNfc_OvrHal.c14
-rw-r--r--src/phFriNfc_TopazDynamicMap.c4
-rw-r--r--src/phFriNfc_TopazMap.c16
-rw-r--r--src/phHal4Nfc.c1
-rw-r--r--src/phHciNfc_NfcIPMgmt.c4
-rw-r--r--src/phLibNfc.c1
-rw-r--r--src/phLibNfc_SE.c6
-rw-r--r--src/phLibNfc_initiator.c89
-rw-r--r--src/phLibNfc_llcp.c2
-rw-r--r--src/phLibNfc_ndef_raw.c10
-rw-r--r--src/phLlcNfc_Frame.c2
26 files changed, 59 insertions, 249 deletions
diff --git a/Linux_x86/phDal4Nfc.c b/Linux_x86/phDal4Nfc.c
index 8683a17..1fc5135 100644
--- a/Linux_x86/phDal4Nfc.c
+++ b/Linux_x86/phDal4Nfc.c
@@ -290,7 +290,6 @@ PURPOSE: DAL Shutdown function.
NFCSTATUS phDal4Nfc_Shutdown( void *pContext, void *pHwRef)
{
NFCSTATUS result = NFCSTATUS_SUCCESS;
- void * pThreadReturn;
// if (pContext == NULL)
// return NFCSTATUS_INVALID_PARAMETER;
@@ -536,8 +535,6 @@ NFCSTATUS phDal4Nfc_Config(pphDal4Nfc_sConfig_t config,void **phwref)
NFCSTATUS retstatus = NFCSTATUS_SUCCESS;
const hw_module_t* hw_module;
nfc_pn544_device_t* pn544_dev;
- uint8_t num_eeprom_settings;
- uint8_t* eeprom_settings;
int ret;
/* Retrieve the hw module from the Android NFC HAL */
@@ -705,9 +702,6 @@ NFCSTATUS phDal4Nfc_Download()
int phDal4Nfc_ReaderThread(void * pArg)
{
- char retvalue;
- NFCSTATUS result = NFCSTATUS_SUCCESS;
- uint8_t retry_cnt=0;
void * memsetRet;
static int MsgType= PHDAL4NFC_READ_MESSAGE;
@@ -715,7 +709,6 @@ int phDal4Nfc_ReaderThread(void * pArg)
phDal4Nfc_Message_t sMsg;
phOsalNfc_Message_t OsalMsg ;
- int i;
int i2c_error_count;
int i2c_workaround;
int i2c_device_address = 0x57;
@@ -833,8 +826,6 @@ retry:
*/
NFCSTATUS phDal4Nfc_StartThreads(void)
{
- pthread_attr_t nReadThreadAttributes;
- pthread_attr_t nWriteThreadAttributes;
int ret;
if(sem_init(&nfc_read_sem, 0, 0) == -1)
@@ -911,7 +902,6 @@ void phDal4Nfc_FillMsg(phDal4Nfc_Message_t *pDalMsg,phOsalNfc_Message_t *pOsalMs
void phDal4Nfc_DeferredCb (void *params)
{
int* pParam=NULL;
- int i;
phNfc_sTransactionInfo_t TransactionInfo;
pParam=(int*)params;
diff --git a/inc/phNfcTypes.h b/inc/phNfcTypes.h
index 79d12aa..0bba933 100644
--- a/inc/phNfcTypes.h
+++ b/inc/phNfcTypes.h
@@ -129,7 +129,7 @@ typedef uint16_t NFCSTATUS; /**< \ingroup grp_nfc_common
* compiler warnings.
*/
-#define PHNFC_UNUSED_VARIABLE(x) for((x)=(x);(x)!=(x);)
+#define PHNFC_UNUSED_VARIABLE(x) (void)x
/*@}*/
diff --git a/src/phDnldNfc.c b/src/phDnldNfc.c
index 3d85144..c0b4b4c 100755
--- a/src/phDnldNfc.c
+++ b/src/phDnldNfc.c
@@ -2054,9 +2054,6 @@ phDnldNfc_Send_Raw(
}
case PHDNLD_CMD_WRITE:
{
- phDnldNfc_sRawDataHdr_t *raw_data_hdr =
- ( phDnldNfc_sRawDataHdr_t * ) (raw_frame + FRAME_HEADER_LEN);
-
psDnldContext->resp_length = PHDNLD_MIN_PACKET;
break;
@@ -2108,8 +2105,6 @@ phDnldNfc_Send_Raw(
}
else
{
- phDnldNfc_sRawDataHdr_t *raw_data_hdr =
- ( phDnldNfc_sRawDataHdr_t * ) (raw_frame + FRAME_HEADER_LEN);
psDnldContext->resp_length = PHDNLD_MIN_PACKET;
}
@@ -2186,32 +2181,6 @@ phDnldNfc_Send_Raw(
static
NFCSTATUS
-phDnldNfc_Frame_Complete(phDnldNfc_sContext_t *psDnldContext)
-{
- NFCSTATUS status = NFCSTATUS_SUCCESS;
- phDnldNfc_sData_Hdr_t *p_dnld_raw = NULL;
- uint32_t dnld_index = psDnldContext->dnld_index;
- uint8_t *p_raw_sec_hdr = NULL;
- uint16_t tx_length = 0x00;
-
- dnld_index = dnld_index + psDnldContext->prev_dnld_size;
- p_raw_sec_hdr = psDnldContext->p_fw_raw + dnld_index;
- dnld_index = dnld_index + *p_raw_sec_hdr;
-
- p_dnld_raw = (phDnldNfc_sData_Hdr_t *) (psDnldContext->p_fw_raw +
- psDnldContext->dnld_index);
-
- tx_length = ((p_dnld_raw->frame_length[0] << BYTE_SIZE) |
- p_dnld_raw->frame_length[1]);
-
- tx_length = tx_length + PHDNLD_MIN_PACKET;
-
- return status;
-}
-
-
-static
-NFCSTATUS
phDnldNfc_Raw_Write(
phDnldNfc_sContext_t *psDnldContext,
void *pHwRef
@@ -3715,8 +3684,6 @@ phDnldNfc_Upgrade (
phNfcIF_sCallBack_t if_callback = { NULL, NULL, NULL, NULL };
phNfc_sLowerIF_t *plower_if = NULL;
NFCSTATUS status = NFCSTATUS_SUCCESS;
- section_info_t *p_cur_sec = NULL;
- unsigned sec_type = 0;
if( (NULL == pHwRef)
)
diff --git a/src/phFriNfc_DesfireFormat.c b/src/phFriNfc_DesfireFormat.c
index 4f3bbdd..50cf142 100644
--- a/src/phFriNfc_DesfireFormat.c
+++ b/src/phFriNfc_DesfireFormat.c
@@ -691,8 +691,8 @@ static NFCSTATUS phFriNfc_Desf_HGetSWVersion(phFriNfc_sNdefSmtCrdFmt_t *NdefSmtC
NFCSTATUS status = PHNFCSTVAL(CID_FRI_NFC_NDEF_SMTCRDFMT,
NFCSTATUS_FORMAT_ERROR);
- if( ( NdefSmtCrdFmt->SendRecvBuf[*(NdefSmtCrdFmt->SendRecvLength)- 1] ==
- PH_FRINFC_DESF_PICC_ADDI_FRAME_RESP) )
+ if (NdefSmtCrdFmt->SendRecvBuf[*(NdefSmtCrdFmt->SendRecvLength)- 1] ==
+ PH_FRINFC_DESF_PICC_ADDI_FRAME_RESP)
{
/*set the state*/
NdefSmtCrdFmt->State = PH_FRINFC_DESF_STATE_GET_SW_VERSION;
@@ -710,8 +710,8 @@ static NFCSTATUS phFriNfc_Desf_HUpdateVersionDetails(phFriNfc_sNdefSmtCrdFmt_t *
NFCSTATUS status = PHNFCSTVAL(CID_NFC_NONE,
NFCSTATUS_SUCCESS);
- if( ( NdefSmtCrdFmt->SendRecvBuf[*(NdefSmtCrdFmt->SendRecvLength)-
- PH_SMTCRDFMT_DESF_VAL1] == PH_FRINFC_DESF_PICC_ADDI_FRAME_RESP ) )
+ if (NdefSmtCrdFmt->SendRecvBuf[*(NdefSmtCrdFmt->SendRecvLength) -
+ PH_SMTCRDFMT_DESF_VAL1] == PH_FRINFC_DESF_PICC_ADDI_FRAME_RESP)
{
NdefSmtCrdFmt->AddInfo.Type4Info.MajorVersion = NdefSmtCrdFmt->SendRecvBuf[PH_SMTCRDFMT_DESF_VAL3];
NdefSmtCrdFmt->AddInfo.Type4Info.MinorVersion = NdefSmtCrdFmt->SendRecvBuf[PH_SMTCRDFMT_DESF_VAL4];
@@ -779,8 +779,8 @@ static NFCSTATUS phFriNfc_Desf_HGetUIDDetails(phFriNfc_sNdefSmtCrdFmt_t * NdefSm
{
NFCSTATUS status = NFCSTATUS_PENDING;
- if( ( NdefSmtCrdFmt->SendRecvBuf[*(NdefSmtCrdFmt->SendRecvLength)-
- PH_SMTCRDFMT_DESF_VAL1] == PH_FRINFC_DESF_PICC_ADDI_FRAME_RESP) )
+ if (NdefSmtCrdFmt->SendRecvBuf[*(NdefSmtCrdFmt->SendRecvLength) -
+ PH_SMTCRDFMT_DESF_VAL1] == PH_FRINFC_DESF_PICC_ADDI_FRAME_RESP)
{
/*set the state*/
NdefSmtCrdFmt->State = PH_FRINFC_DESF_STATE_GET_UID;
diff --git a/src/phFriNfc_DesfireMap.c b/src/phFriNfc_DesfireMap.c
index d2f68dd..2ce46ad 100644
--- a/src/phFriNfc_DesfireMap.c
+++ b/src/phFriNfc_DesfireMap.c
@@ -1182,7 +1182,7 @@ NFCSTATUS phFriNfc_Desfire_SelectFile (phFriNfc_NdefMap_t *NdefMap)
}
#endif /* #ifdef DESFIRE_EV1 */
- if ( (NdefMap->DespOpFlag == PH_FRINFC_NDEFMAP_DESF_NDEF_CHK_OP))
+ if (NdefMap->DespOpFlag == PH_FRINFC_NDEFMAP_DESF_NDEF_CHK_OP)
{
/* cap container file identifier*/
diff --git a/src/phFriNfc_FelicaMap.c b/src/phFriNfc_FelicaMap.c
index 39b98d9..c45f335 100644
--- a/src/phFriNfc_FelicaMap.c
+++ b/src/phFriNfc_FelicaMap.c
@@ -767,7 +767,7 @@ static NFCSTATUS phFriNfc_Felica_HSetTransceiveForRead(phFriNfc_NdefMap_t *Nde
/* set the felica cmd */
#ifdef PH_HAL4_ENABLE
- NdefMap->Cmd.FelCmd = phHal_eFelica_Raw;
+ NdefMap->Cmd.FelCmd = (phNfc_eFelicaCmdList_t)phHal_eFelica_Raw;
#else
NdefMap->Cmd.FelCmd = phHal_eFelicaCmdListFelicaCmd;
#endif /* #ifdef PH_HAL4_ENABLE */
@@ -977,7 +977,7 @@ static NFCSTATUS phFriNfc_Felica_HUpdateAttrBlkForWrOp(phFriNfc_NdefMap_t *Ndef
/* Set the Felica Cmd*/
#ifdef PH_HAL4_ENABLE
- NdefMap->Cmd.FelCmd = phHal_eFelica_Raw;
+ NdefMap->Cmd.FelCmd = (phNfc_eFelicaCmdList_t)phHal_eFelica_Raw;
#else
NdefMap->Cmd.FelCmd = phHal_eFelicaCmdListFelicaCmd;
#endif /* #ifdef PH_HAL4_ENABLE */
@@ -1175,7 +1175,7 @@ static NFCSTATUS phFriNfc_Felica_HWrEmptyMsg(phFriNfc_NdefMap_t *NdefMap)
/* Set the Felica Cmd*/
#ifdef PH_HAL4_ENABLE
- NdefMap->Cmd.FelCmd = phHal_eFelica_Raw;
+ NdefMap->Cmd.FelCmd = (phNfc_eFelicaCmdList_t)phHal_eFelica_Raw;
#else
NdefMap->Cmd.FelCmd = phHal_eFelicaCmdListFelicaCmd;
#endif /* #ifdef PH_HAL4_ENABLE */
@@ -2095,7 +2095,7 @@ static NFCSTATUS phFriNfc_Felica_HWriteDataBlk(phFriNfc_NdefMap_t *NdefMap)
/*Set the ISO14434 command*/
#ifdef PH_HAL4_ENABLE
- NdefMap->Cmd.FelCmd = phHal_eFelica_Raw;
+ NdefMap->Cmd.FelCmd = (phNfc_eFelicaCmdList_t)phHal_eFelica_Raw;
#else
NdefMap->Cmd.FelCmd = phHal_eFelicaCmdListFelicaCmd;
#endif /* #ifdef PH_HAL4_ENABLE */
@@ -2167,7 +2167,7 @@ static NFCSTATUS phFriNfc_Felica_HPollCard( phFriNfc_NdefMap_t *NdefMap,
NdefMap->State = state;
/* set the felica cmd */
- NdefMap->Cmd.FelCmd = phHal_eFelica_Raw;
+ NdefMap->Cmd.FelCmd = (phNfc_eFelicaCmdList_t)phHal_eFelica_Raw;
/*set the additional informations for the data exchange*/
NdefMap->psDepAdditionalInfo.DepFlags.MetaChaining = 0;
@@ -2246,7 +2246,7 @@ static NFCSTATUS phFriNfc_Felica_HUpdateManufIdDetails(const phFriNfc_NdefMap_
NFCSTATUS status = NFCSTATUS_PENDING;
/* Get the details from Poll Response packet */
- if (NdefMap->SendRecvLength >= 20)
+ if (NdefMap->SendRecvLength >= (uint16_t*)20)
{
(void)memcpy( (uint8_t *)NdefMap->psRemoteDevInfo->RemoteDevInfo.Felica_Info.IDm,
(uint8_t *)&NdefMap->SendRecvBuf[2], 8);
@@ -2730,7 +2730,7 @@ static NFCSTATUS phFriNfc_Felica_HRdAttrInfo(phFriNfc_NdefMap_t *NdefMap)
/* Set the Felica Cmd*/
#ifdef PH_HAL4_ENABLE
- NdefMap->Cmd.FelCmd = phHal_eFelica_Raw;
+ NdefMap->Cmd.FelCmd = (phNfc_eFelicaCmdList_t)phHal_eFelica_Raw;
#else
NdefMap->Cmd.FelCmd = phHal_eFelicaCmdListFelicaCmd;
#endif /* #ifdef PH_HAL4_ENABLE */
diff --git a/src/phFriNfc_ISO15693Format.c b/src/phFriNfc_ISO15693Format.c
index 077035e..a477f2a 100644
--- a/src/phFriNfc_ISO15693Format.c
+++ b/src/phFriNfc_ISO15693Format.c
@@ -544,8 +544,6 @@ phFriNfc_ISO15693_FmtProcess (
{
phFriNfc_sNdefSmtCrdFmt_t *psNdefSmtCrdFmt =
(phFriNfc_sNdefSmtCrdFmt_t *)pContext;
- phFriNfc_ISO15693_AddInfo_t *ps_iso15693_info =
- &(psNdefSmtCrdFmt->AddInfo.s_iso15693_info);
if((NFCSTATUS_SUCCESS & PHNFCSTBLOWER) == (Status & PHNFCSTBLOWER))
{
diff --git a/src/phFriNfc_Llcp.c b/src/phFriNfc_Llcp.c
index 5b9736b..bf80722 100644
--- a/src/phFriNfc_Llcp.c
+++ b/src/phFriNfc_Llcp.c
@@ -825,6 +825,7 @@ static NFCSTATUS phFriNfc_Llcp_HandleLinkPacket( phFriNfc_Llcp_t *Llcp,
default:
{
/* Error: invalid ptype field, dropping packet */
+ result = NFCSTATUS_FAILED;
break;
}
}
@@ -839,7 +840,6 @@ static NFCSTATUS phFriNfc_Llcp_HandleTransportPacket( phFriNfc_Llcp_t *Llcp,
phFriNfc_Llcp_Recv_CB_t pfRecvCB;
void *pContext;
NFCSTATUS result = NFCSTATUS_SUCCESS;
- phFriNfc_Llcp_sPacketHeader_t sHeader;
/* Forward to upper layer */
if (Llcp->pfRecvCB != NULL)
@@ -923,7 +923,6 @@ static bool_t phFriNfc_Llcp_HandlePendingSend ( phFriNfc_Llcp_t *Llcp )
return_value = TRUE;
}
-clean_and_return:
if (bDeallocate)
{
phFriNfc_Llcp_Deallocate(psSendInfo);
diff --git a/src/phFriNfc_LlcpTransport.c b/src/phFriNfc_LlcpTransport.c
index 447eae6..51f520e 100644
--- a/src/phFriNfc_LlcpTransport.c
+++ b/src/phFriNfc_LlcpTransport.c
@@ -1804,7 +1804,6 @@ NFCSTATUS phFriNfc_LlcpTransport_Connect( phFriNfc_LlcpTransport_Socket_t*
{
NFCSTATUS status = NFCSTATUS_SUCCESS;
uint8_t nLocalSap;
- uint8_t i;
/* Check for NULL pointers */
if(pLlcpSocket == NULL || pConnect_RspCb == NULL || pContext == NULL)
@@ -1894,7 +1893,6 @@ NFCSTATUS phFriNfc_LlcpTransport_ConnectByUri(phFriNfc_LlcpTransport_Socket_t*
void* pContext)
{
NFCSTATUS status = NFCSTATUS_SUCCESS;
- uint8_t i;
uint8_t nLocalSap;
/* Check for NULL pointers */
diff --git a/src/phFriNfc_LlcpTransport_Connection.c b/src/phFriNfc_LlcpTransport_Connection.c
index f4be919..4fb50ab 100644
--- a/src/phFriNfc_LlcpTransport_Connection.c
+++ b/src/phFriNfc_LlcpTransport_Connection.c
@@ -47,10 +47,6 @@ static void phFriNfc_LlcpTransport_ConnectionOriented_SendLlcp_CB(void* p
{
phFriNfc_LlcpTransport_t *psTransport;
phFriNfc_LlcpTransport_Socket_t psTempLlcpSocket;
- phFriNfc_LlcpTransport_Socket_t *psLocalLlcpSocket = NULL;
- phNfc_sData_t sFrmrBuffer;
- uint8_t index;
- uint8_t socketFound = FALSE;
NFCSTATUS result;
/* Get Send CB context */
psTransport = (phFriNfc_LlcpTransport_t*)pContext;
@@ -1609,7 +1605,6 @@ NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_Listen(phFriNfc_LlcpTranspor
void* pContext)
{
NFCSTATUS status = NFCSTATUS_SUCCESS;
- uint8_t index;
/* Store the listen callback */
pLlcpSocket->pfSocketListen_Cb = pListen_Cb;
diff --git a/src/phFriNfc_LlcpTransport_Connectionless.c b/src/phFriNfc_LlcpTransport_Connectionless.c
index 4b084a8..37bf14f 100644
--- a/src/phFriNfc_LlcpTransport_Connectionless.c
+++ b/src/phFriNfc_LlcpTransport_Connectionless.c
@@ -132,7 +132,6 @@ static void phFriNfc_LlcpTransport_Connectionless_SendTo_CB(void* pContex
{
phFriNfc_LlcpTransport_Socket_t * pLlcpSocket = (phFriNfc_LlcpTransport_Socket_t*)pContext;
pphFriNfc_LlcpTransportSocketSendCb_t pfSavedCallback;
- void * pSavedContext;
/* Call the send callback */
pfSavedCallback = pLlcpSocket->pfSocketSend_Cb;
diff --git a/src/phFriNfc_MifareStdMap.c b/src/phFriNfc_MifareStdMap.c
index efe86d6..c9f2e4b 100644
--- a/src/phFriNfc_MifareStdMap.c
+++ b/src/phFriNfc_MifareStdMap.c
@@ -3747,8 +3747,8 @@ static NFCSTATUS phFriNfc_MifStd_H_ChkTLVs(phFriNfc_NdefMap_t *NdefMap,
+ PH_FRINFC_MIFARESTD_VAL2):
PH_FRINFC_MIFARESTD_VAL0);
- if(( NdefMap->SendRecvBuf[TempLength] ==
- PH_FRINFC_MIFARESTD_VAL0))
+ if (NdefMap->SendRecvBuf[TempLength] ==
+ PH_FRINFC_MIFARESTD_VAL0)
{
Result = PHNFCSTVAL(CID_FRI_NFC_NDEF_MAP,
NFCSTATUS_INVALID_PARAMETER);
diff --git a/src/phFriNfc_MifareULMap.c b/src/phFriNfc_MifareULMap.c
index efaaceb..15e882e 100644
--- a/src/phFriNfc_MifareULMap.c
+++ b/src/phFriNfc_MifareULMap.c
@@ -3059,8 +3059,8 @@ static NFCSTATUS phFriNfc_MfUL_H_fillSendBufToWr(phFriNfc_NdefMap_t *NdefMap)
if((NdefMap->TLVStruct.NdefTLVByte - PH_FRINFC_NDEFMAP_MFUL_VAL1) <
PH_FRINFC_NDEFMAP_MFUL_VAL3)
{
- if ((NdefMap->TLVStruct.NdefTLVSector ==
- NdefMap->MifareULContainer.CurrentSector))
+ if (NdefMap->TLVStruct.NdefTLVSector ==
+ NdefMap->MifareULContainer.CurrentSector)
{
if(NdefMap->MifareULContainer.CurrentBlock ==
NdefMap->TLVStruct.NdefTLVBlock)
@@ -3086,8 +3086,8 @@ static NFCSTATUS phFriNfc_MfUL_H_fillSendBufToWr(phFriNfc_NdefMap_t *NdefMap)
}
else
{
- if ((NdefMap->TLVStruct.NdefTLVSector ==
- NdefMap->MifareULContainer.CurrentSector))
+ if (NdefMap->TLVStruct.NdefTLVSector ==
+ NdefMap->MifareULContainer.CurrentSector)
{
if(NdefMap->MifareULContainer.CurrentBlock ==
(NdefMap->TLVStruct.NdefTLVBlock +
diff --git a/src/phFriNfc_NdefRecord.c b/src/phFriNfc_NdefRecord.c
index 7da565f..29be434 100644
--- a/src/phFriNfc_NdefRecord.c
+++ b/src/phFriNfc_NdefRecord.c
@@ -46,6 +46,15 @@
/* Harsha: To Fix: 0000358: phFriNfc_NdefRecord.h: includes should be moved */
#include <string.h>
+static uint8_t phFriNfc_NdefRecord_TypeNameFormat ( uint8_t *Record);
+static uint8_t phFriNfc_NdefRecord_RecordFlag ( uint8_t *Record);
+static NFCSTATUS phFriNfc_NdefRecord_RecordIDCheck ( uint8_t *Record,
+ uint8_t *TypeLength,
+ uint8_t *TypeLengthByte,
+ uint8_t *PayloadLengthByte,
+ uint32_t *PayloadLength,
+ uint8_t *IDLengthByte,
+ uint8_t *IDLength);
/*!
*
diff --git a/src/phFriNfc_NdefRecord.h b/src/phFriNfc_NdefRecord.h
index b537c41..c888b6e 100644
--- a/src/phFriNfc_NdefRecord.h
+++ b/src/phFriNfc_NdefRecord.h
@@ -442,58 +442,6 @@ uint32_t phFriNfc_NdefRecord_GetLength(phFriNfc_NdefRecord_t* pRecord);
/** \internal
*
- * This is a sub function to the Generate Function. This function will get bit fields of the Flags Byte
- * and returns the Status Flag. No Error Checks done here.
- *
- * \note <b>This is not a user API. This should not be exposed in the SDK.</b>
- */
- static uint8_t phFriNfc_NdefRecord_NdefFlag(uint8_t Flags,uint8_t Mask);
-
-/** \internal
- *
- * This is a sub function to the Parse Function. This function will get only flag bits in a Packet
- * and omit the Type Name Format bits. No Error Checks done here.
- *
- * \note <b>This is not a user API. This should not be exposed in the SDK.</b>
- */
- static uint8_t phFriNfc_NdefRecord_RecordFlag ( uint8_t* pRecord);
-
-/** \internal
- *
- * This is a sub function to the Parse Function. This function will get only Type Name Format bits in a Packet
- * and omit the other Flags bits. No Error Checks done here.
- *
- * \note <b>This is not a user API. This should not be exposed in the SDK.</b>
- */
- static uint8_t phFriNfc_NdefRecord_TypeNameFormat ( uint8_t* pRecord);
-
-/** \internal
- *
- * This function is a sub function of both Get Records and Parse function. This function extracts the
- * Type Length, Payload Length and ID Length for the respective Type, Payload and ID Data.
- *
- * \param[in] Record The data buffer holding the NDEF Message, as provided by the caller.
- * \param[out] TypeLength Length of the Type Data.
- * \param[out] TypeLengthByte Number of Bytes required to store Type Length.
- * \param[out] PayloadLengthByte Number of Bytes required to store Payload Length depends on Short and
- * Normal Record.
- * \param[out] PayloadLength Length of the Payload Data.
- * \param[out] IDLengthByte Number of Bytes required to store ID Length.
- * \param[out] IDLength Length of the ID Data.
- *
- * \note <b>This is not a user API. This should not be exposed in the SDK.</b>
- *
- */
-static NFCSTATUS phFriNfc_NdefRecord_RecordIDCheck (uint8_t* pRecord,
- uint8_t* pTypeLength,
- uint8_t* pTypeLengthByte,
- uint8_t* pPayloadLengthByte,
- uint32_t* pPayloadLength,
- uint8_t* pIDLengthByte,
- uint8_t* pIDLength
- );
-/** \internal
- *
* This is a sub function to the Parse Function. This function will get only Type Name Format bits in a Packet
* and omit the other Flags bits. No Error Checks done here.
*
diff --git a/src/phFriNfc_OvrHal.c b/src/phFriNfc_OvrHal.c
index 9efff94..07942aa 100644
--- a/src/phFriNfc_OvrHal.c
+++ b/src/phFriNfc_OvrHal.c
@@ -332,11 +332,6 @@ static void phFriNfc_OvrHal_CB_Transceive(void *context,
*OvrHal->pndef_recv_length = (uint16_t) pRecvdata->length;
}
}
- if(NULL != RemoteDevHandle)
- {
- /* Fix for Warning 4100 */
- RemoteDevHandle=RemoteDevHandle;
- }
if (NULL != OvrHal->TemporaryCompletionInfo.CompletionRoutine)
{
@@ -397,16 +392,11 @@ static void phFriNfc_OvrHal_CB_ConnectDisconnect(void *context,
if (NULL != OvrHal)
{
- if (RemoteDevHandle != NULL)
- {
- /* Fix for Warning 4100 */
- RemoteDevHandle = RemoteDevHandle;
- }
- else
+ if (RemoteDevHandle == NULL)
{
status = NFCSTATUS_FAILED;
}
-
+
OvrHal->TemporaryCompletionInfo.CompletionRoutine(
OvrHal->TemporaryCompletionInfo.Context, status);
}
diff --git a/src/phFriNfc_TopazDynamicMap.c b/src/phFriNfc_TopazDynamicMap.c
index e9d1529..4fe02b1 100644
--- a/src/phFriNfc_TopazDynamicMap.c
+++ b/src/phFriNfc_TopazDynamicMap.c
@@ -1813,7 +1813,7 @@ phFriNfc_Tpz_H_NxpRead (
/* Depending on the jewel command, the send length is decided */
#ifdef TOPAZ_RAW_SUPPORT
- psNdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ psNdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
/* " send_index " is incremented because already received buffer is filled with
TOPAZ command */
send_index = (uint8_t)(send_index + 1);
@@ -1967,7 +1967,7 @@ phFriNfc_Tpz_H_NxpWrite(
/* " send_index " is incremented because already received buffer is filled with
TOPAZ command */
send_index = (uint8_t)(send_index + 1);
- psNdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ psNdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
switch (*psNdefMap->SendRecvBuf)
diff --git a/src/phFriNfc_TopazMap.c b/src/phFriNfc_TopazMap.c
index 8a0cc5f..0ec7332 100644
--- a/src/phFriNfc_TopazMap.c
+++ b/src/phFriNfc_TopazMap.c
@@ -277,7 +277,7 @@ NFCSTATUS phFriNfc_TopazMap_ChkNdef( phFriNfc_NdefMap_t *NdefMap)
NdefMap->PrevOperation = PH_FRINFC_NDEFMAP_CHECK_OPE;
#ifdef TOPAZ_RAW_SUPPORT
- NdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ NdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
NdefMap->SendRecvBuf[PH_FRINFC_TOPAZ_VAL0] = PH_FRINFC_TOPAZ_CMD_READID;
#else
#ifdef PH_HAL4_ENABLE
@@ -361,7 +361,7 @@ NFCSTATUS phFriNfc_TopazMap_RdNdef( phFriNfc_NdefMap_t *NdefMap
PH_FRINFC_TOPAZ_FLAG0;
/* Topaz command = READALL */
#ifdef TOPAZ_RAW_SUPPORT
- NdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ NdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
NdefMap->SendRecvBuf[PH_FRINFC_TOPAZ_VAL0] = PH_FRINFC_TOPAZ_CMD_READALL;
#else
@@ -443,7 +443,7 @@ NFCSTATUS phFriNfc_TopazMap_WrNdef( phFriNfc_NdefMap_t *NdefMap,
/* Topaz command = READALL */
#ifdef TOPAZ_RAW_SUPPORT
- NdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ NdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
NdefMap->SendRecvBuf[PH_FRINFC_TOPAZ_VAL0] = PH_FRINFC_TOPAZ_CMD_READALL;
#else
#ifdef PH_HAL4_ENABLE
@@ -926,7 +926,7 @@ static NFCSTATUS phFriNfc_Tpz_H_RdBytes(phFriNfc_NdefMap_t *NdefMap,
#endif /* #ifdef TOPAZ_RAW_SUPPORT */
#ifdef TOPAZ_RAW_SUPPORT
- NdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ NdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
/*Copy command to Send Buffer*/
NdefMap->SendRecvBuf[PH_FRINFC_TOPAZ_VAL0] = PH_FRINFC_TOPAZ_CMD_READID;
index ++;
@@ -955,7 +955,7 @@ static NFCSTATUS phFriNfc_Tpz_H_RdBytes(phFriNfc_NdefMap_t *NdefMap,
#endif /* #ifdef TOPAZ_RAW_SUPPORT */
#ifdef TOPAZ_RAW_SUPPORT
- NdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ NdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
/*Copy command to Send Buffer*/
NdefMap->SendRecvBuf[PH_FRINFC_TOPAZ_VAL0] = PH_FRINFC_TOPAZ_CMD_READALL;
index ++;
@@ -993,7 +993,7 @@ static NFCSTATUS phFriNfc_Tpz_H_RdBytes(phFriNfc_NdefMap_t *NdefMap,
#endif /* #ifdef TOPAZ_RAW_SUPPORT */
#ifdef TOPAZ_RAW_SUPPORT
- NdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ NdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
/*Copy command to Send Buffer*/
NdefMap->SendRecvBuf[PH_FRINFC_TOPAZ_VAL0] = PH_FRINFC_TOPAZ_CMD_READ;
index ++;
@@ -1086,7 +1086,7 @@ static NFCSTATUS phFriNfc_Tpz_H_WrAByte(phFriNfc_NdefMap_t *NdefMap,
*NdefMap->SendRecvLength = NdefMap->TempReceiveLength;
/* Command used to write 1 byte */
#ifdef TOPAZ_RAW_SUPPORT
- NdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ NdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
#else
#ifdef PH_HAL4_ENABLE
NdefMap->Cmd.JewelCmd = phHal_eJewel_Write1E;
@@ -1170,7 +1170,7 @@ static NFCSTATUS phFriNfc_Tpz_H_ProReadID(phFriNfc_NdefMap_t *NdefMap)
NdefMap->State = PH_FRINFC_TOPAZ_STATE_READALL;
/* Topaz command = READALL */
#ifdef TOPAZ_RAW_SUPPORT
- NdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
+ NdefMap->Cmd.JewelCmd = (phNfc_eJewelCmdList_t)phHal_eJewel_Raw;
NdefMap->SendRecvBuf[PH_FRINFC_TOPAZ_VAL0] = PH_FRINFC_TOPAZ_CMD_READALL;
#else
#ifdef PH_HAL4_ENABLE
diff --git a/src/phHal4Nfc.c b/src/phHal4Nfc.c
index 0a1b13c..df72bd8 100644
--- a/src/phHal4Nfc.c
+++ b/src/phHal4Nfc.c
@@ -1449,7 +1449,6 @@ STATIC void phHal4Nfc_DownloadComplete(
}
else
{
- type = type;
Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)pContext;
/*Copy back stored context/callback for the upper layer*/
pUpper_Context = Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt;
diff --git a/src/phHciNfc_NfcIPMgmt.c b/src/phHciNfc_NfcIPMgmt.c
index 68449be..1afdba1 100644
--- a/src/phHciNfc_NfcIPMgmt.c
+++ b/src/phHciNfc_NfcIPMgmt.c
@@ -1413,6 +1413,8 @@ phHciNfc_NfcIP_InfoUpdate(
case phNfc_eDataRate_424:
ALOGI("I'm P2P %s Initiator @ 424 kb/s", p_nfcipinfo->activation_mode ? "Active" : "Passive");
break;
+ default:
+ break;
}
}
p_nfcipinfo->target_speed = (phHciNfc_eP2PSpeed_t)
@@ -1428,6 +1430,8 @@ phHciNfc_NfcIP_InfoUpdate(
case phNfc_eDataRate_424:
ALOGI("I'm P2P %s Target @ 424 kb/s", p_nfcipinfo->activation_mode ? "Active" : "Passive");
break;
+ default:
+ break;
}
}
p_nfcipinfo->max_frame_len = NFCIP_DATA_RATE_CALC(*reg_value);
diff --git a/src/phLibNfc.c b/src/phLibNfc.c
index 6477a3f..b22f9ee 100644
--- a/src/phLibNfc.c
+++ b/src/phLibNfc.c
@@ -338,7 +338,6 @@ STATIC void phLibNfc_DefaultHandler(
}
else
{
- info = info;
if((NFC_EVENT_NOTIFICATION == type) &&
(NFCSTATUS_BOARD_COMMUNICATION_ERROR == status))
{
diff --git a/src/phLibNfc_SE.c b/src/phLibNfc_SE.c
index 0ccfce6..841cf2a 100644
--- a/src/phLibNfc_SE.c
+++ b/src/phLibNfc_SE.c
@@ -650,11 +650,7 @@ NFCSTATUS phLibNfc_SE_SetMode ( phLibNfc_Handle hSE_Handle,
pLibContext->sSeContext.sSeCallabackInfo.pSEsetModeCb = pSE_SetMode_Rsp_cb;
pLibContext->sSeContext.sSeCallabackInfo.pSEsetModeCtxt=pContext;
}
- else if(Status == NFCSTATUS_INVALID_HANDLE)
- {
- Status= Status;
- }
- else
+ else if(Status != NFCSTATUS_INVALID_HANDLE)
{
// Restore original mode
pLibContext->sSeContext.eActivatedMode = originalMode;
diff --git a/src/phLibNfc_initiator.c b/src/phLibNfc_initiator.c
index ab4d766..b9796d2 100644
--- a/src/phLibNfc_initiator.c
+++ b/src/phLibNfc_initiator.c
@@ -76,14 +76,6 @@ STATIC void phLibNfc_RemoteDev_Connect_Cb(
NFCSTATUS status
);
-#ifdef RECONNECT_SUPPORT
-STATIC
-void
-phLibNfc_config_discovery_con_failure_cb (
- void *context,
- NFCSTATUS status);
-#endif /* #ifdef RECONNECT_SUPPORT */
-
/*Remote device disconnect response callback*/
STATIC void phLibNfc_RemoteDev_Disconnect_cb(
void *context,
@@ -321,15 +313,11 @@ void phLibNfc_NotificationRegister_Resp_Cb (
gpphLibContext->dev_cnt = tag_disc_flg;
/* Check for if the discovered tags are multiple or
Multiple protocol tag */
- if((gpphLibContext->dev_cnt > 1)&&(
- (status ==NFCSTATUS_MULTIPLE_PROTOCOLS) ||
- (status ==NFCSTATUS_MULTIPLE_TAGS)) )
- {
- status = status;
- }
- else
+ if ((gpphLibContext->dev_cnt <= 1) ||
+ ((status != NFCSTATUS_MULTIPLE_PROTOCOLS) &&
+ (status != NFCSTATUS_MULTIPLE_TAGS)))
{
- status =NFCSTATUS_SUCCESS;
+ status = NFCSTATUS_SUCCESS;
}
/*Notify to upper layer the no of tag discovered and
the protocol */
@@ -658,75 +646,6 @@ NFCSTATUS phLibNfc_RemoteDev_Connect(
return RetVal;
}
-#ifdef RECONNECT_SUPPORT
-STATIC
-void
-phLibNfc_config_discovery_con_failure_cb (
- void *context,
- NFCSTATUS status)
-{
- if((phLibNfc_LibContext_t *)context == gpphLibContext)
- { /*check for same context*/
- pphLibNfc_ConnectCallback_t ps_client_con_cb =
- gpphLibContext->CBInfo.pClientConnectCb;
-
- if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state)
- {
- /*If shutdown called in between allow shutdown to happen*/
- phLibNfc_Pending_Shutdown();
- status = NFCSTATUS_SHUTDOWN;
- }
- else
- {
- gpphLibContext->status.GenCb_pending_status = FALSE;
- gpphLibContext->status.DiscEnbl_status = FALSE;
- status = NFCSTATUS_TARGET_LOST;
-
- phLibNfc_UpdateCurState (status,gpphLibContext);
-#ifdef RESTART_CFG
- if(gpphLibContext->status.Discovery_pending_status == TRUE)
- {
- NFCSTATUS RetStatus = NFCSTATUS_FAILED;
- /* Application has called discovery before receiving this callback,
- so NO notification to the upper layer, instead lower layer
- discovery is called */
- gpphLibContext->status.Discovery_pending_status = FALSE;
- RetStatus = phHal4Nfc_ConfigureDiscovery(
- gpphLibContext->psHwReference,
- gpphLibContext->eLibNfcCfgMode,
- &gpphLibContext->sADDconfig,
- (pphLibNfc_RspCb_t)
- phLibNfc_config_discovery_cb,
- (void *)gpphLibContext);
- if (NFCSTATUS_PENDING == RetStatus)
- {
- (void)phLibNfc_UpdateNextState(gpphLibContext,
- eLibNfcHalStateConfigReady);
- gpphLibContext->status.GenCb_pending_status = TRUE;
- gpphLibContext->status.DiscEnbl_status = TRUE;
- }
- }
-
-#endif /* #ifdef RESTART_CFG */
- }
-
- if (NULL != ps_client_con_cb)
- {
- gpphLibContext->CBInfo.pClientConnectCb = NULL;
- /* Call the upper layer callback*/
- ps_client_con_cb (gpphLibContext->CBInfo.pClientConCntx,
- 0, NULL, status);
- }
- } /*End of if-context check*/
- else
- { /*exception: wrong context pointer returned*/
- phOsalNfc_RaiseException(phOsalNfc_e_InternalErr,1);
- status = NFCSTATUS_FAILED;
- }
-
-
-}
-#endif /* #ifdef RECONNECT_SUPPORT */
/**
* Response callback for remote device connect
*/
diff --git a/src/phLibNfc_llcp.c b/src/phLibNfc_llcp.c
index 799aae0..6050b1c 100644
--- a/src/phLibNfc_llcp.c
+++ b/src/phLibNfc_llcp.c
@@ -71,7 +71,7 @@ STATIC NFCSTATUS static_CheckDevice(phLibNfc_Handle hRemoteDevice)
{
phLibNfc_sRemoteDevInformation_t* psRemoteDevInfo = (phLibNfc_sRemoteDevInformation_t*)hRemoteDevice;
- if (hRemoteDevice == NULL)
+ if (hRemoteDevice == 0)
{
return NFCSTATUS_INVALID_PARAMETER;
}
diff --git a/src/phLibNfc_ndef_raw.c b/src/phLibNfc_ndef_raw.c
index 4b87d31..785c572 100644
--- a/src/phLibNfc_ndef_raw.c
+++ b/src/phLibNfc_ndef_raw.c
@@ -315,9 +315,9 @@ void phLibNfc_Ndef_Read_Cb(void* Context,NFCSTATUS status)
gpphLibContext->ndef_cntx.is_ndef = FALSE;
ps_rem_dev_info = (phHal_sRemoteDevInformation_t *)
gpphLibContext->Connected_handle;
- if ((phHal_eMifare_PICC == ps_rem_dev_info->RemDevType) &&
- (0x08 == (ps_rem_dev_info->RemoteDevInfo.Iso14443A_Info.Sak & 0x08)) ||
- (0x01 == ps_rem_dev_info->RemoteDevInfo.Iso14443A_Info.Sak))
+ if ((phHal_eMifare_PICC == ps_rem_dev_info->RemDevType &&
+ ((0x08 == (ps_rem_dev_info->RemoteDevInfo.Iso14443A_Info.Sak & 0x08)) ||
+ (0x01 == ps_rem_dev_info->RemoteDevInfo.Iso14443A_Info.Sak))))
{
/* card type is mifare 1k/4k, then reconnect */
@@ -562,8 +562,8 @@ void phLibNfc_Ndef_Write_Cb(void* Context,NFCSTATUS status)
field of reader*/
ps_rem_dev_info = (phHal_sRemoteDevInformation_t *)
gpphLibContext->Connected_handle;
- if ((phHal_eMifare_PICC == ps_rem_dev_info->RemDevType) &&
- (0x08 == (ps_rem_dev_info->RemoteDevInfo.Iso14443A_Info.Sak & 0x08)))
+ if ((phHal_eMifare_PICC == ps_rem_dev_info->RemDevType &&
+ 0x08 == (ps_rem_dev_info->RemoteDevInfo.Iso14443A_Info.Sak & 0x08)))
{
diff --git a/src/phLlcNfc_Frame.c b/src/phLlcNfc_Frame.c
index af61761..e62b078 100644
--- a/src/phLlcNfc_Frame.c
+++ b/src/phLlcNfc_Frame.c
@@ -1230,7 +1230,7 @@ phLlcNfc_H_ProcessIFrame (
/* Received buffer, N(S) value = N(R) of host (our
structure) then send RR type of s frame else send
REJ type of s frame */
- if ((ns_index == ps_frame_info->n_r)
+ if (ns_index == ps_frame_info->n_r
#if defined (LLC_SEND_RR_ACK)
|| ((ns_index < ps_frame_info->n_r) &&