Fix build failure which occurs after setting macro RILC_LOG.
am: 626099ec9b

Change-Id: I193a57f676a81a5835d4506550f94278cbc127cc
diff --git a/libril/Android.mk b/libril/Android.mk
index 5984d9b..f23bfec 100644
--- a/libril/Android.mk
+++ b/libril/Android.mk
@@ -21,6 +21,7 @@
     libprotobuf-c-nano-enable_malloc \
 
 #LOCAL_CFLAGS := -DANDROID_MULTI_SIM -DDSDA_RILD1
+LOCAL_CFLAGS += -Wno-unused-parameter
 
 ifeq ($(SIM_COUNT), 2)
     LOCAL_CFLAGS += -DANDROID_SIM_COUNT_2
@@ -51,7 +52,7 @@
     librilutils_static \
     libprotobuf-c-nano-enable_malloc
 
-LOCAL_CFLAGS :=
+LOCAL_CFLAGS += -Wno-unused-parameter
 
 LOCAL_MODULE:= libril_static
 
diff --git a/libril/RilSapSocket.cpp b/libril/RilSapSocket.cpp
index 19457f4..58b4f51 100644
--- a/libril/RilSapSocket.cpp
+++ b/libril/RilSapSocket.cpp
@@ -224,18 +224,18 @@
 #define BYTES_PER_LINE 16
 
 #define NIBBLE_TO_HEX(n) ({ \
-  uint8_t __n = (uint8_t) n & 0x0f; \
+  uint8_t __n = (uint8_t) (n) & 0x0f; \
   __nibble >= 10 ? 'A' + __n - 10: '0' + __n; \
 })
 
 #define HEX_HIGH(b) ({ \
-  uint8_t __b = (uint8_t) b; \
+  uint8_t __b = (uint8_t) (b); \
   uint8_t __nibble = (__b >> 4) & 0x0f; \
   NIBBLE_TO_HEX(__nibble); \
 })
 
 #define HEX_LOW(b) ({ \
-  uint8_t __b = (uint8_t) b; \
+  uint8_t __b = (uint8_t) (b); \
   uint8_t __nibble = __b & 0x0f; \
   NIBBLE_TO_HEX(__nibble); \
 })
diff --git a/libril/ril.cpp b/libril/ril.cpp
index e1d30ea..71f953b 100755
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -92,8 +92,8 @@
 #define RESPONSE_UNSOLICITED_ACK_EXP 4
 
 /* Negative values for private RIL errno's */
-#define RIL_ERRNO_INVALID_RESPONSE -1
-#define RIL_ERRNO_NO_MEMORY -12
+#define RIL_ERRNO_INVALID_RESPONSE (-1)
+#define RIL_ERRNO_NO_MEMORY (-12)
 
 // request, response, and unsolicited msg print macro
 #define PRINTBUF_SIZE 8096
diff --git a/reference-ril/atchannel.c b/reference-ril/atchannel.c
index 6124d88..84e8c37 100644
--- a/reference-ril/atchannel.c
+++ b/reference-ril/atchannel.c
@@ -36,7 +36,7 @@
 #include "misc.h"
 
 
-#define NUM_ELEMS(x) (sizeof(x)/sizeof(x[0]))
+#define NUM_ELEMS(x) (sizeof(x)/sizeof((x)[0]))
 
 #define MAX_AT_RESPONSE (8 * 1024)
 #define HANDSHAKE_RETRY_COUNT 8