diff options
author | Colin Cross <ccross@android.com> | 2016-09-18 15:57:45 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2016-09-18 16:06:21 -0700 |
commit | e10478dd5869b974085e7c55737c4fce7b3bb1e2 (patch) | |
tree | e6eab7677ea18f34fac3f36af6f91f25eb4c9034 | |
parent | a549a4317dd85d3b83eee579bcc085adbcf207cf (diff) | |
download | libnfc-nci-e10478dd5869b974085e7c55737c4fce7b3bb1e2.tar.gz |
Fix log warnings in libnfc-nci
system/core/include is included in the global include path using
-isystem, which hides all warnings. Move LOG_TAG definitions before
including OverrideLog.h, which includes log/log.h, in order to fix macro
redefinition warnings. Fix a size_t log format warning. Also disable
missing field initializer warnings.
Test: m -j native
Bug: 31492149
Change-Id: I4877a184ab55c3836081631b201943ef02d56a35
-rw-r--r-- | Android.mk | 1 | ||||
-rw-r--r-- | halimpl/bcm2079x/adaptation/NonVolatileStore.cpp | 4 | ||||
-rw-r--r-- | halimpl/bcm2079x/adaptation/OverrideLog.cpp | 3 | ||||
-rw-r--r-- | halimpl/bcm2079x/adaptation/config.cpp | 5 | ||||
-rw-r--r-- | halimpl/bcm2079x/adaptation/patchram.cpp | 7 | ||||
-rw-r--r-- | halimpl/bcm2079x/adaptation/userial_linux.c | 4 |
6 files changed, 15 insertions, 9 deletions
@@ -7,6 +7,7 @@ HALIMPL := halimpl/bcm2079x D_CFLAGS := -DANDROID -DBUILDCFG=1 \ -Wno-deprecated-register \ -Wno-unused-parameter \ + -Wno-missing-field-initializers \ ###################################### diff --git a/halimpl/bcm2079x/adaptation/NonVolatileStore.cpp b/halimpl/bcm2079x/adaptation/NonVolatileStore.cpp index f921f99..8c75bcf 100644 --- a/halimpl/bcm2079x/adaptation/NonVolatileStore.cpp +++ b/halimpl/bcm2079x/adaptation/NonVolatileStore.cpp @@ -15,8 +15,10 @@ * limitations under the License. * ******************************************************************************/ -#include "OverrideLog.h" + #define LOG_TAG "NfcNciHal" + +#include "OverrideLog.h" #include "gki.h" extern "C" { diff --git a/halimpl/bcm2079x/adaptation/OverrideLog.cpp b/halimpl/bcm2079x/adaptation/OverrideLog.cpp index ce40d8a..4766b75 100644 --- a/halimpl/bcm2079x/adaptation/OverrideLog.cpp +++ b/halimpl/bcm2079x/adaptation/OverrideLog.cpp @@ -16,6 +16,8 @@ * ******************************************************************************/ +#define LOG_TAG "NfcNciHal" + /****************************************************************************** * * Override the ALOGD(), ALOGE(), and other logging macros from @@ -27,7 +29,6 @@ #include <string.h> #include "config.h" #include "android_logmsg.h" -#define LOG_TAG "NfcNciHal" unsigned char appl_trace_level = BT_TRACE_LEVEL_DEBUG; diff --git a/halimpl/bcm2079x/adaptation/config.cpp b/halimpl/bcm2079x/adaptation/config.cpp index f847389..2909c36 100644 --- a/halimpl/bcm2079x/adaptation/config.cpp +++ b/halimpl/bcm2079x/adaptation/config.cpp @@ -15,6 +15,9 @@ * limitations under the License. * ******************************************************************************/ + +#define LOG_TAG "NfcNciHal" + #include "OverrideLog.h" #include "config.h" #include <stdio.h> @@ -22,8 +25,6 @@ #include <vector> #include <list> -#define LOG_TAG "NfcNciHal" - const char transport_config_path[] = "/etc/"; #define config_name "libnfc-brcm.conf" diff --git a/halimpl/bcm2079x/adaptation/patchram.cpp b/halimpl/bcm2079x/adaptation/patchram.cpp index 76947b9..dc93309 100644 --- a/halimpl/bcm2079x/adaptation/patchram.cpp +++ b/halimpl/bcm2079x/adaptation/patchram.cpp @@ -15,6 +15,9 @@ * limitations under the License. * ******************************************************************************/ + +#define LOG_TAG "NfcNciHal" + #include "OverrideLog.h" #include "config.h" #include "nfc_hal_int.h" @@ -29,8 +32,6 @@ extern "C" #include "spdhelper.h" #include "StartupConfig.h" -#define LOG_TAG "NfcNciHal" - #define FW_PRE_PATCH "FW_PRE_PATCH" #define FW_PATCH "FW_PATCH" #define MAX_RF_DATA_CREDITS "MAX_RF_DATA_CREDITS" @@ -434,7 +435,7 @@ static void StartPatchDownload(UINT32 chipid) HAL_NfcPrmSetI2cPatch((UINT8*)sI2cFixPrmBuf, (UINT16)lenPrmBuffer, 0); } else - ALOGE("%s fail reading i2c fix; actual len=%u; expected len=%lu", __FUNCTION__, actualLen, lenPrmBuffer); + ALOGE("%s fail reading i2c fix; actual len=%zu; expected len=%lu", __FUNCTION__, actualLen, lenPrmBuffer); } else { diff --git a/halimpl/bcm2079x/adaptation/userial_linux.c b/halimpl/bcm2079x/adaptation/userial_linux.c index f7ea94e..2d5b28b 100644 --- a/halimpl/bcm2079x/adaptation/userial_linux.c +++ b/halimpl/bcm2079x/adaptation/userial_linux.c @@ -16,6 +16,8 @@ * ******************************************************************************/ +#define LOG_TAG "USERIAL_LINUX" + #include "OverrideLog.h" #include <string.h> #include "gki.h" @@ -79,8 +81,6 @@ UINT8 bcmi2cnfc_read_multi_packets = 0; #include <sys/socket.h> -#define LOG_TAG "USERIAL_LINUX" - static UINT8 spi_negotiation[10] = { 0xF0, /* CMD */ 0x00, /* SPI PARM Negotiation */ 0x01, /* SPI Version */ |