diff options
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; } |