diff options
author | Tianjie Xu <xunchang@google.com> | 2017-08-29 19:21:09 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-29 19:21:09 +0200 |
commit | 11f68b6b691425eb001a073ff56d8b448a564d8a (patch) | |
tree | 97d6d0bcebdc2947739b3a0e1144eab50899c4bd /otafault | |
parent | Merge "Add libasyncio." (diff) | |
parent | Turn on -Wall for recovery modules (diff) | |
download | android_bootable_recovery-11f68b6b691425eb001a073ff56d8b448a564d8a.tar android_bootable_recovery-11f68b6b691425eb001a073ff56d8b448a564d8a.tar.gz android_bootable_recovery-11f68b6b691425eb001a073ff56d8b448a564d8a.tar.bz2 android_bootable_recovery-11f68b6b691425eb001a073ff56d8b448a564d8a.tar.lz android_bootable_recovery-11f68b6b691425eb001a073ff56d8b448a564d8a.tar.xz android_bootable_recovery-11f68b6b691425eb001a073ff56d8b448a564d8a.tar.zst android_bootable_recovery-11f68b6b691425eb001a073ff56d8b448a564d8a.zip |
Diffstat (limited to '')
-rw-r--r-- | otafault/Android.mk | 3 | ||||
-rw-r--r-- | otafault/config.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/otafault/Android.mk b/otafault/Android.mk index 7b5aab0b8..4784d56ef 100644 --- a/otafault/Android.mk +++ b/otafault/Android.mk @@ -24,6 +24,7 @@ otafault_static_libs := \ liblog LOCAL_CFLAGS := \ + -Wall \ -Werror \ -Wthread-safety \ -Wthread-safety-negative \ @@ -46,7 +47,7 @@ LOCAL_SRC_FILES := config.cpp ota_io.cpp test.cpp LOCAL_MODULE_TAGS := tests LOCAL_MODULE := otafault_test LOCAL_STATIC_LIBRARIES := $(otafault_static_libs) -LOCAL_CFLAGS := -Werror +LOCAL_CFLAGS := -Wall -Werror LOCAL_C_INCLUDES := bootable/recovery LOCAL_FORCE_STATIC_EXECUTABLE := true diff --git a/otafault/config.cpp b/otafault/config.cpp index 8590833ee..b94e429c6 100644 --- a/otafault/config.cpp +++ b/otafault/config.cpp @@ -69,7 +69,9 @@ std::string fault_fname(const char* io_type) { fname.resize(OTAIO_MAX_FNAME_SIZE); ZipString zip_type_path(type_path.c_str()); ZipEntry entry; - int status = FindEntry(archive, zip_type_path, &entry); + if (FindEntry(archive, zip_type_path, &entry) != 0) { + return {}; + } ExtractToMemory(archive, &entry, reinterpret_cast<uint8_t*>(&fname[0]), OTAIO_MAX_FNAME_SIZE); return fname; } |