diff options
author | Martijn Coenen <maco@google.com> | 2016-05-13 06:51:20 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-05-13 06:51:20 +0000 |
commit | cc6d4f138145d79f4314eb6488a065a6c0ff0fa9 (patch) | |
tree | 9e015cc8d4a2197a369d4a9c320ca5cabdef1ab7 | |
parent | 3a6393f85fc6099f1dd7a58c006af76f9e8b1be0 (diff) | |
parent | 65ebec5a7e3be5d18414ac8f0dd3f5090b4ae3b4 (diff) | |
download | libnfc-nci-cc6d4f138145d79f4314eb6488a065a6c0ff0fa9.tar.gz |
Merge "Fix warnings in external/libnfc-nci/src."
-rw-r--r-- | src/adaptation/CrcChecksum.cpp | 4 | ||||
-rw-r--r-- | src/adaptation/NfcAdaptation.cpp | 1 | ||||
-rw-r--r-- | src/adaptation/OverrideLog.cpp | 2 | ||||
-rw-r--r-- | src/adaptation/config.cpp | 1 | ||||
-rw-r--r-- | src/nfa/dm/nfa_dm_main.c | 2 | ||||
-rw-r--r-- | src/nfa/sys/nfa_sys_main.c | 2 | ||||
-rw-r--r-- | src/nfc/llcp/llcp_api.c | 2 | ||||
-rw-r--r-- | src/nfc/tags/ce_t4t.c | 4 | ||||
-rw-r--r-- | src/nfc/tags/rw_t2t.c | 2 | ||||
-rw-r--r-- | src/nfc/tags/rw_t2t_ndef.c | 2 | ||||
-rw-r--r-- | src/nfc/tags/rw_t4t.c | 4 |
11 files changed, 16 insertions, 10 deletions
diff --git a/src/adaptation/CrcChecksum.cpp b/src/adaptation/CrcChecksum.cpp index 691e8ef..33b5ccd 100644 --- a/src/adaptation/CrcChecksum.cpp +++ b/src/adaptation/CrcChecksum.cpp @@ -22,6 +22,8 @@ #include <fcntl.h> #include <errno.h> #include <string> + +#undef LOG_TAG #define LOG_TAG "NfcNciHal" @@ -117,7 +119,7 @@ BOOLEAN crcChecksumVerifyIntegrity (const char* filename) close (fileStream); if ((actualReadCrc == sizeof(checksum)) && (data.size() > 0)) { - ALOGD ("%s: data size=%u", __FUNCTION__, data.size()); + ALOGD ("%s: data size=%zu", __FUNCTION__, data.size()); if (checksum == crcChecksumCompute ((const unsigned char*) data.data(), data.size())) isGood = TRUE; else diff --git a/src/adaptation/NfcAdaptation.cpp b/src/adaptation/NfcAdaptation.cpp index 841c04a..371e31b 100644 --- a/src/adaptation/NfcAdaptation.cpp +++ b/src/adaptation/NfcAdaptation.cpp @@ -27,6 +27,7 @@ extern "C" #include "config.h" #include "android_logmsg.h" +#undef LOG_TAG #define LOG_TAG "NfcAdaptation" extern "C" void GKI_shutdown(); diff --git a/src/adaptation/OverrideLog.cpp b/src/adaptation/OverrideLog.cpp index d0fda56..8f4656b 100644 --- a/src/adaptation/OverrideLog.cpp +++ b/src/adaptation/OverrideLog.cpp @@ -27,6 +27,8 @@ #include <string.h> #include "config.h" #include "android_logmsg.h" + +#undef LOG_TAG #define LOG_TAG "BrcmNfcJni" diff --git a/src/adaptation/config.cpp b/src/adaptation/config.cpp index b6cf681..d07c187 100644 --- a/src/adaptation/config.cpp +++ b/src/adaptation/config.cpp @@ -22,6 +22,7 @@ #include <vector> #include <list> +#undef LOG_TAG #define LOG_TAG "NfcAdaptation" const char transport_config_path[] = "/etc/"; diff --git a/src/nfa/dm/nfa_dm_main.c b/src/nfa/dm/nfa_dm_main.c index 1b96c71..14a4187 100644 --- a/src/nfa/dm/nfa_dm_main.c +++ b/src/nfa/dm/nfa_dm_main.c @@ -42,7 +42,7 @@ static const tNFA_SYS_REG nfa_dm_sys_reg = }; -tNFA_DM_CB nfa_dm_cb = {FALSE}; +tNFA_DM_CB nfa_dm_cb = {0, }; #define NFA_DM_NUM_ACTIONS (NFA_DM_MAX_EVT & 0x00ff) diff --git a/src/nfa/sys/nfa_sys_main.c b/src/nfa/sys/nfa_sys_main.c index efbf7ff..1335adc 100644 --- a/src/nfa/sys/nfa_sys_main.c +++ b/src/nfa/sys/nfa_sys_main.c @@ -36,7 +36,7 @@ /* system manager control block definition */ #if NFA_DYNAMIC_MEMORY == FALSE -tNFA_SYS_CB nfa_sys_cb = {0}; /* nfa_sys control block. statically initialize 'flags' field to 0 */ +tNFA_SYS_CB nfa_sys_cb = {0, }; /* nfa_sys control block. statically initialize 'flags' field to 0 */ #endif /******************************************************************************* diff --git a/src/nfc/llcp/llcp_api.c b/src/nfc/llcp/llcp_api.c index fb70b0d..4c2740d 100644 --- a/src/nfc/llcp/llcp_api.c +++ b/src/nfc/llcp/llcp_api.c @@ -355,7 +355,7 @@ UINT8 LLCP_RegisterServer (UINT8 reg_sap, { UINT8 sap; UINT16 length; - tLLCP_APP_CB *p_app_cb; + tLLCP_APP_CB *p_app_cb = {0, }; LLCP_TRACE_API3 ("LLCP_RegisterServer (): SAP:0x%x, link_type:0x%x, ServiceName:<%s>", reg_sap, link_type, ((p_service_name == NULL) ? "" : p_service_name)); diff --git a/src/nfc/tags/ce_t4t.c b/src/nfc/tags/ce_t4t.c index b812cff..43d1a23 100644 --- a/src/nfc/tags/ce_t4t.c +++ b/src/nfc/tags/ce_t4t.c @@ -717,7 +717,7 @@ static void ce_t4t_data_cback (UINT8 conn_id, tNFC_CONN_EVT event, tNFC_CONN *p_ BE_STREAM_TO_UINT8 (length, p_cmd); /* Le */ /* check if valid parameters */ - if (length <= CE_T4T_MAX_LE) + if ((UINT32)length <= CE_T4T_MAX_LE) { /* CE allows to read more than current file size but not max file size */ if (length + offset > max_file_size) @@ -768,7 +768,7 @@ static void ce_t4t_data_cback (UINT8 conn_id, tNFC_CONN_EVT event, tNFC_CONN *p_ BE_STREAM_TO_UINT8 (length, p_cmd); /* Lc */ /* check if valid parameters */ - if (length <= CE_T4T_MAX_LC) + if ((UINT32)length <= CE_T4T_MAX_LC) { if (length + offset > ce_cb.mem.t4t.max_file_size) { diff --git a/src/nfc/tags/rw_t2t.c b/src/nfc/tags/rw_t2t.c index 3976b3b..ebe1dec 100644 --- a/src/nfc/tags/rw_t2t.c +++ b/src/nfc/tags/rw_t2t.c @@ -65,7 +65,7 @@ static void rw_t2t_proc_data (UINT8 conn_id, tNFC_DATA_CEVT *p_data) BOOLEAN b_notify = TRUE; BOOLEAN b_release = TRUE; UINT8 *p; - tRW_READ_DATA evt_data = {0}; + tRW_READ_DATA evt_data = {0, }; tT2T_CMD_RSP_INFO *p_cmd_rsp_info = (tT2T_CMD_RSP_INFO *) rw_cb.tcb.t2t.p_cmd_rsp_info; tRW_DETECT_NDEF_DATA ndef_data; #if (BT_TRACE_VERBOSE == TRUE) diff --git a/src/nfc/tags/rw_t2t_ndef.c b/src/nfc/tags/rw_t2t_ndef.c index 3304a90..de8442e 100644 --- a/src/nfc/tags/rw_t2t_ndef.c +++ b/src/nfc/tags/rw_t2t_ndef.c @@ -258,7 +258,7 @@ static void rw_t2t_handle_cc_read_rsp (void) static void rw_t2t_ntf_tlv_detect_complete (tNFC_STATUS status) { tRW_T2T_CB *p_t2t = &rw_cb.tcb.t2t; - tRW_DETECT_NDEF_DATA ndef_data = {0}; + tRW_DETECT_NDEF_DATA ndef_data = {0, }; tRW_DETECT_TLV_DATA tlv_data; tRW_T2T_DETECT evt_data; UINT8 xx; diff --git a/src/nfc/tags/rw_t4t.c b/src/nfc/tags/rw_t4t.c index c634591..17fa307 100644 --- a/src/nfc/tags/rw_t4t.c +++ b/src/nfc/tags/rw_t4t.c @@ -331,7 +331,7 @@ static BOOLEAN rw_t4t_create_app (void) UINT24_TO_BE_STREAM (p, T4T_DES_EV1_NFC_APP_ID); UINT16_TO_BE_STREAM (p, 0x0F21); /*Key settings and no.of keys */ UINT16_TO_BE_STREAM (p, 0x05E1); /* ISO file ID */ - ARRAY_TO_BE_STREAM (p, df_name, sizeof(df_name)); /*DF file name */ + ARRAY_TO_BE_STREAM (p, df_name, (int)sizeof(df_name)); /*DF file name */ UINT8_TO_BE_STREAM (p, 0x00); /* Le */ p_c_apdu->len = 20; } @@ -561,7 +561,7 @@ static BOOLEAN rw_t4t_write_cc (void) UINT24_TO_BE_STREAM (p, 0x000000); /* Set the offset */ UINT24_TO_BE_STREAM (p, 0x0F0000); /* Set available length */ - ARRAY_TO_BE_STREAM (p, CCFileBytes, sizeof(CCFileBytes)); + ARRAY_TO_BE_STREAM (p, CCFileBytes, (int)sizeof(CCFileBytes)); UINT8_TO_BE_STREAM (p, 0x00); /* Le */ p_c_apdu->len = 28; |