am e608a529: Merge "Remove unnecessary check of multiple advertise instance count." into lmp-mr1-dev

* commit 'e608a529718bb64accdf9f18cb196a9a3c45c90e':
  Remove unnecessary check of multiple advertise instance count.
diff --git a/bta/Android.mk b/bta/Android.mk
index c863d10..cdde31b 100644
--- a/bta/Android.mk
+++ b/bta/Android.mk
@@ -7,6 +7,7 @@
 	-DBOARD_HAVE_BLUETOOTH_BCM
 endif
 LOCAL_CFLAGS += -DBUILDCFG $(bdroid_CFLAGS) -std=c99
+LOCAL_CLANG_CFLAGS += -Wno-error=gnu-variable-sized-type-not-at-end
 
 LOCAL_PRELINK_MODULE:=false
 LOCAL_SRC_FILES:= \
diff --git a/btif/src/btif_sock_sdp.c b/btif/src/btif_sock_sdp.c
index afd99ce..b2fecdd 100644
--- a/btif/src/btif_sock_sdp.c
+++ b/btif/src/btif_sock_sdp.c
@@ -386,7 +386,7 @@
 
             SDP_AddProfileDescriptorList(sdp_handle,
                 UUID_SERVCLASS_OBEX_OBJECT_PUSH,
-                0x0100);
+                0x0101);
         }
     }
 
diff --git a/main/Android.mk b/main/Android.mk
index 21dfa1c..d7c3d0a 100644
--- a/main/Android.mk
+++ b/main/Android.mk
@@ -144,4 +144,6 @@
 	libbt-vendor
 LOCAL_MULTILIB := 32
 
+LOCAL_CLANG_CFLAGS := -Wno-error=gnu-variable-sized-type-not-at-end
+
 include $(BUILD_SHARED_LIBRARY)
diff --git a/stack/Android.mk b/stack/Android.mk
index f1159a6..0ae47f4 100644
--- a/stack/Android.mk
+++ b/stack/Android.mk
@@ -156,5 +156,9 @@
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
 LOCAL_SHARED_LIBRARIES := libcutils libc
 LOCAL_MULTILIB := 32
+# gnu-variable-sized-type-not-at-end is needed for a variable-size header in
+# a struct.
+# const-logical-operand is needed for code in l2c_utils.c that looks intentional.
+LOCAL_CLANG_CFLAGS += -Wno-error=gnu-variable-sized-type-not-at-end -Wno-error=constant-logical-operand
 
 include $(BUILD_STATIC_LIBRARY)
diff --git a/stack/gatt/gatt_sr.c b/stack/gatt/gatt_sr.c
index 2199794..eac00db 100755
--- a/stack/gatt/gatt_sr.c
+++ b/stack/gatt/gatt_sr.c
@@ -123,7 +123,7 @@
 static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
                                        tGATTS_RSP *p_msg, UINT16 mtu)
 {
-    tGATTS_RSP       *p_rsp;
+    tGATTS_RSP       *p_rsp = NULL;
     UINT16          ii, total_len, len;
     BT_HDR          *p_buf = (BT_HDR *)GKI_getbuf((UINT16)sizeof(tGATTS_RSP));
     UINT8           *p;