diff options
author | Mark Salyzyn | 2014-05-15 17:05:25 -0500 |
---|---|---|
committer | Mark Salyzyn | 2014-05-23 11:48:09 -0500 |
commit | 5ce757518b8ce43849b6cfa1faac41ce6cb14894 (patch) | |
tree | 9f034f9cb43a026fb18ae2ee20d0143d913f4081 | |
parent | 08c372d18ecfc02cf7cba7ef65007118b78762bd (diff) | |
download | platform-system-core-5ce757518b8ce43849b6cfa1faac41ce6cb14894.tar.gz platform-system-core-5ce757518b8ce43849b6cfa1faac41ce6cb14894.tar.xz platform-system-core-5ce757518b8ce43849b6cfa1faac41ce6cb14894.zip |
cpio: Turn on -Werror
- Solve st_mode is uint16_t on MAC
- Turn on -Werror
Change-Id: I67b62424245545099ed283c56dae544153b85425
-rw-r--r-- | cpio/Android.mk | 2 | ||||
-rw-r--r-- | cpio/mkbootfs.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/cpio/Android.mk b/cpio/Android.mk index 5184463bc..575beb2c5 100644 --- a/cpio/Android.mk +++ b/cpio/Android.mk | |||
@@ -8,6 +8,8 @@ LOCAL_SRC_FILES := \ | |||
8 | 8 | ||
9 | LOCAL_MODULE := mkbootfs | 9 | LOCAL_MODULE := mkbootfs |
10 | 10 | ||
11 | LOCAL_CFLAGS := -Werror | ||
12 | |||
11 | include $(BUILD_HOST_EXECUTABLE) | 13 | include $(BUILD_HOST_EXECUTABLE) |
12 | 14 | ||
13 | $(call dist-for-goals,dist_files,$(LOCAL_BUILT_MODULE)) | 15 | $(call dist-for-goals,dist_files,$(LOCAL_BUILT_MODULE)) |
diff --git a/cpio/mkbootfs.c b/cpio/mkbootfs.c index 7d3740c0f..7175749b1 100644 --- a/cpio/mkbootfs.c +++ b/cpio/mkbootfs.c | |||
@@ -78,8 +78,9 @@ static void fix_stat(const char *path, struct stat *s) | |||
78 | s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); | 78 | s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); |
79 | } else { | 79 | } else { |
80 | // Use the compiled-in fs_config() function. | 80 | // Use the compiled-in fs_config() function. |
81 | 81 | unsigned st_mode = s->st_mode; | |
82 | fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &s->st_mode, &capabilities); | 82 | fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &st_mode, &capabilities); |
83 | s->st_mode = (typeof(s->st_mode)) st_mode; | ||
83 | } | 84 | } |
84 | } | 85 | } |
85 | 86 | ||