summaryrefslogtreecommitdiff
path: root/utils/src
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2017-10-23 16:02:01 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-10-23 16:02:01 +0000
commit8fb106a796a6ad3e682f7ec65ab3a3e2045b13bf (patch)
tree905f27afc639df814d7199c685cdb47c052a39d3 /utils/src
parent674b3ad5a6c2b8d174cc78b3334e58532a1168e3 (diff)
parentfaa82529299f7ce6e972a5d5c54e1b6f92d79f22 (diff)
downloadlibufdt-8fb106a796a6ad3e682f7ec65ab3a3e2045b13bf.tar.gz
Merge "Revert "Use -Werror in system/libufdt/utils/src""
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/Android.mk1
-rw-r--r--utils/src/mkdtimg.c1
-rw-r--r--utils/src/mkdtimg_dump.c5
3 files changed, 2 insertions, 5 deletions
diff --git a/utils/src/Android.mk b/utils/src/Android.mk
index 9e0c9b4..13bc059 100644
--- a/utils/src/Android.mk
+++ b/utils/src/Android.mk
@@ -19,7 +19,6 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := mkdtimg
-LOCAL_CFLAGS := -Wall -Werror
LOCAL_SRC_FILES := \
mkdtimg.c \
mkdtimg_cfg_create.c \
diff --git a/utils/src/mkdtimg.c b/utils/src/mkdtimg.c
index 9caf603..3de9d7e 100644
--- a/utils/src/mkdtimg.c
+++ b/utils/src/mkdtimg.c
@@ -119,6 +119,7 @@ int main(int argc, char *argv[]) {
return 1;
}
+ const char *command = argv[1];
const struct command_info *info = search_command(argv[1]);
if (info == NULL) {
return 1;
diff --git a/utils/src/mkdtimg_dump.c b/utils/src/mkdtimg_dump.c
index b04a816..5fcb604 100644
--- a/utils/src/mkdtimg_dump.c
+++ b/utils/src/mkdtimg_dump.c
@@ -163,10 +163,7 @@ static int dump_image_from_fp(FILE *out_fp, FILE *img_fp,
for (i = 0; i < entry_count; i++) {
struct dt_table_entry entry;
fseek(img_fp, entry_offset, SEEK_SET);
- if (fread(&entry, sizeof(entry), 1, img_fp) != 1) {
- fprintf(stderr, "Read dt_table_entry error.\n");
- return -1;
- }
+ fread(&entry, sizeof(entry), 1, img_fp);
output_table_entry(out_fp, i, &entry);
uint32_t dt_size = fdt32_to_cpu(entry.dt_size);