resolved conflicts for merge of 88aba541 to lmp-mr1-dev-plus-aosp
Change-Id: Ie5ef819dd8168cb6a73f84a881a92c116705fffc
diff --git a/Android.mk b/Android.mk
index fc644b5..532a843 100644
--- a/Android.mk
+++ b/Android.mk
@@ -51,33 +51,36 @@
libmincrypt \
libbatteryservice
+vold_conlyflags := -std=c11
+vold_cflags := -Werror -Wall -Wno-missing-field-initializers
+
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := libvold
-LOCAL_CLANG := false
+LOCAL_CLANG := true
LOCAL_SRC_FILES := $(common_src_files)
LOCAL_C_INCLUDES := $(common_c_includes)
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
LOCAL_MODULE_TAGS := eng tests
-LOCAL_CFLAGS := -Werror -Wall -Wno-missing-field-initializers
+LOCAL_CFLAGS := $(vold_cflags)
+LOCAL_CONLYFLAGS := $(vold_conlyflags)
-LOCAL_CXX_STL := libc++
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE:= vold
-LOCAL_CLANG := false
+LOCAL_CLANG := true
LOCAL_SRC_FILES := \
main.cpp \
$(common_src_files)
LOCAL_C_INCLUDES := $(common_c_includes)
-
-LOCAL_CFLAGS := -Werror -Wall -Wno-missing-field-initializers
+LOCAL_CFLAGS := $(vold_cflags)
+LOCAL_CONLYFLAGS := $(vold_conlyflags)
ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH)
@@ -88,16 +91,16 @@
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
-LOCAL_CXX_STL := libc++
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_CLANG := false
+LOCAL_CLANG := true
LOCAL_SRC_FILES:= vdc.c
LOCAL_MODULE:= vdc
LOCAL_SHARED_LIBRARIES := libcutils
-LOCAL_CFLAGS := -Werror -Wall -Wno-missing-field-initializers
+LOCAL_CFLAGS := $(vold_cflags)
+LOCAL_CONLYFLAGS := $(vold_conlyflags)
include $(BUILD_EXECUTABLE)
diff --git a/cryptfs.c b/cryptfs.c
index 7770f72..9c84fe5 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -978,7 +978,7 @@
char *real_blk_name, const char *name, int fd,
char *extra_params)
{
- char buffer[DM_CRYPT_BUF_SIZE];
+ _Alignas(struct dm_ioctl) char buffer[DM_CRYPT_BUF_SIZE];
struct dm_ioctl *io;
struct dm_target_spec *tgt;
char *crypt_params;