diff options
author | Colin Cross <ccross@android.com> | 2016-09-30 01:19:12 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-09-30 01:19:12 +0000 |
commit | 5b558497869bbaf7ae7a511e730dd2e1ae083ff4 (patch) | |
tree | 8b9241b87eaf691cc55d42fd07bbee939f180b04 /ext4_utils | |
parent | 78d0e95371f1096908d52f3b62bd369aabd1359f (diff) | |
parent | 2108b3a3739c460c81bc3fbae132db29dde67abc (diff) | |
download | extras-5b558497869bbaf7ae7a511e730dd2e1ae083ff4.tar.gz |
Merge "Revert "ext4_utils: -Werror"" am: 3e3353e88f am: 884bf31b61
am: 2108b3a373
Change-Id: I0047aac1fc06b93c04e71b15e12d5d3cbdb4d0cb
Diffstat (limited to 'ext4_utils')
-rw-r--r-- | ext4_utils/Android.mk | 16 | ||||
-rw-r--r-- | ext4_utils/allocate.c | 3 | ||||
-rw-r--r-- | ext4_utils/make_ext4fs.c | 11 |
3 files changed, 10 insertions, 20 deletions
diff --git a/ext4_utils/Android.mk b/ext4_utils/Android.mk index ee07b69c..a8362b22 100644 --- a/ext4_utils/Android.mk +++ b/ext4_utils/Android.mk @@ -23,7 +23,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(libext4_utils_src_files) LOCAL_MODULE := libext4_utils_host # Various instances of dereferencing a type-punned pointer in extent.c -LOCAL_CFLAGS += -fno-strict-aliasing -Werror +LOCAL_CFLAGS += -fno-strict-aliasing LOCAL_STATIC_LIBRARIES := \ libsparse_host \ libz @@ -44,7 +44,7 @@ LOCAL_STATIC_LIBRARIES += \ LOCAL_LDLIBS_windows += -lws2_32 LOCAL_SHARED_LIBRARIES_darwin += libselinux LOCAL_SHARED_LIBRARIES_linux += libselinux -LOCAL_CFLAGS_darwin := -DHOST -Werror +LOCAL_CFLAGS_darwin := -DHOST LOCAL_CFLAGS_linux := -DHOST include $(BUILD_HOST_EXECUTABLE) @@ -52,7 +52,6 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := blk_alloc_to_base_fs.c LOCAL_MODULE := blk_alloc_to_base_fs LOCAL_SHARED_LIBRARIES += libcutils -LOCAL_CFLAGS := -Werror LOCAL_CFLAGS_darwin := -DHOST LOCAL_CFLAGS_linux := -DHOST include $(BUILD_HOST_EXECUTABLE) @@ -72,7 +71,7 @@ LOCAL_SRC_FILES := $(libext4_utils_src_files) LOCAL_MODULE := libext4_utils LOCAL_C_INCLUDES += system/core/logwrapper/include # Various instances of dereferencing a type-punned pointer in extent.c -LOCAL_CFLAGS += -fno-strict-aliasing -Werror +LOCAL_CFLAGS += -fno-strict-aliasing LOCAL_SHARED_LIBRARIES := \ libbase \ libcutils \ @@ -89,7 +88,7 @@ LOCAL_SRC_FILES := $(libext4_utils_src_files) \ ext4_crypt_init_extensions.cpp LOCAL_MODULE := libext4_utils_static # Various instances of dereferencing a type-punned pointer in extent.c -LOCAL_CFLAGS += -fno-strict-aliasing -Werror +LOCAL_CFLAGS += -fno-strict-aliasing LOCAL_STATIC_LIBRARIES := \ libbase \ liblogwrap \ @@ -108,7 +107,7 @@ LOCAL_SHARED_LIBRARIES := \ libext4_utils \ libselinux \ libz -LOCAL_CFLAGS := -DREAL_UUID -Werror +LOCAL_CFLAGS := -DREAL_UUID include $(BUILD_EXECUTABLE) @@ -120,7 +119,6 @@ LOCAL_SHARED_LIBRARIES += \ libselinux \ libsparse \ libz -LOCAL_CFLAGS := -Werror include $(BUILD_EXECUTABLE) @@ -133,7 +131,6 @@ LOCAL_STATIC_LIBRARIES += \ libext4_utils_host \ libsparse_host \ libz -LOCAL_CFLAGS := -Werror include $(BUILD_HOST_EXECUTABLE) @@ -141,7 +138,6 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := setup_fs.c LOCAL_MODULE := setup_fs LOCAL_SHARED_LIBRARIES += libcutils -LOCAL_CFLAGS := -Werror include $(BUILD_EXECUTABLE) @@ -152,7 +148,6 @@ LOCAL_SHARED_LIBRARIES += \ libext4_utils \ libsparse \ libz -LOCAL_CFLAGS := -Werror include $(BUILD_EXECUTABLE) @@ -163,7 +158,6 @@ LOCAL_STATIC_LIBRARIES += \ libext4_utils_host \ libsparse_host \ libz -LOCAL_CFLAGS := -Werror include $(BUILD_HOST_EXECUTABLE) diff --git a/ext4_utils/allocate.c b/ext4_utils/allocate.c index 8b7e8f55..497f580e 100644 --- a/ext4_utils/allocate.c +++ b/ext4_utils/allocate.c @@ -351,8 +351,7 @@ u32 allocate_block() static struct region *ext4_allocate_best_fit_partial(u32 len) { - unsigned int i; - int j; + unsigned int i, j; unsigned int found_bg = 0, found_prev_chunk = 0, found_block = 0; u32 found_allocate_len = 0; bool minimize = false; diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c index bc8ea3a3..f45a6990 100644 --- a/ext4_utils/make_ext4fs.c +++ b/ext4_utils/make_ext4fs.c @@ -79,9 +79,7 @@ #endif -#ifndef MAX_PATH #define MAX_PATH 4096 -#endif #define MAX_BLK_MAPPING_STR 1000 const int blk_file_major_ver = 1; @@ -535,7 +533,7 @@ static int compare_chunks(const void* chunk1, const void* chunk2) { } static int get_block_group(u32 block) { - unsigned i, group = 0; + int i, group = 0; for(i = 0; i < aux_info.groups; i++) { if (block >= aux_info.bgs[i].first_block) group = i; @@ -556,8 +554,7 @@ static void extract_base_fs_allocations(const char *directory, const char *mount char stored_file_name[MAX_PATH], real_file_name[MAX_PATH], file_map[MAX_BLK_MAPPING_STR]; struct block_allocation *fs_alloc; struct block_group_info *bgs = aux_info.bgs; - unsigned i; - int major_version = 0, minor_version = 0; + int i, major_version = 0, minor_version = 0; char *base_file_line = NULL; size_t base_file_line_len = 0; @@ -628,8 +625,8 @@ static void extract_base_fs_allocations(const char *directory, const char *mount } block_range = strtok_r(NULL, ",", &end_string); int bg_first_block = bgs[block_group].first_block; - unsigned min_bg_bound = bgs[block_group].chunks[0].block + bgs[block_group].chunks[0].len; - unsigned max_bg_bound = bgs[block_group].chunks[bgs[block_group].chunk_count - 1].block; + int min_bg_bound = bgs[block_group].chunks[0].block + bgs[block_group].chunks[0].len; + int max_bg_bound = bgs[block_group].chunks[bgs[block_group].chunk_count - 1].block; if (min_bg_bound >= start_block - bg_first_block || max_bg_bound <= end_block - bg_first_block) { |