summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-09-28 20:42:17 +0200
committerTianjie Xu <xunchang@google.com>2016-09-30 20:18:01 +0200
commit17e316cce0047dcb892fb6dae9924cf6e0b41516 (patch)
treeed0fa36534423e5fa55c22afa38248bd1dd303c1
parentMerge "Report uncrypt errors in details" into nyc-mr1-dev-plus-aosp (diff)
downloadandroid_bootable_recovery-17e316cce0047dcb892fb6dae9924cf6e0b41516.tar
android_bootable_recovery-17e316cce0047dcb892fb6dae9924cf6e0b41516.tar.gz
android_bootable_recovery-17e316cce0047dcb892fb6dae9924cf6e0b41516.tar.bz2
android_bootable_recovery-17e316cce0047dcb892fb6dae9924cf6e0b41516.tar.lz
android_bootable_recovery-17e316cce0047dcb892fb6dae9924cf6e0b41516.tar.xz
android_bootable_recovery-17e316cce0047dcb892fb6dae9924cf6e0b41516.tar.zst
android_bootable_recovery-17e316cce0047dcb892fb6dae9924cf6e0b41516.zip
Diffstat (limited to '')
-rw-r--r--Android.mk3
-rw-r--r--applypatch/Android.mk5
-rw-r--r--bootloader_message/Android.mk1
-rw-r--r--edify/Android.mk2
-rw-r--r--minui/Android.mk2
-rw-r--r--otafault/Android.mk2
-rw-r--r--recovery.cpp6
-rw-r--r--tests/Android.mk3
-rw-r--r--uncrypt/Android.mk13
-rw-r--r--update_verifier/Android.mk1
-rw-r--r--updater/Android.mk2
11 files changed, 27 insertions, 13 deletions
diff --git a/Android.mk b/Android.mk
index 74910a10f..185562307 100644
--- a/Android.mk
+++ b/Android.mk
@@ -65,7 +65,7 @@ endif
RECOVERY_API_VERSION := 3
RECOVERY_FSTAB_VERSION := 2
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
-LOCAL_CFLAGS += -Wno-unused-parameter
+LOCAL_CFLAGS += -Wno-unused-parameter -Werror
LOCAL_CLANG := true
LOCAL_C_INCLUDES += \
@@ -150,6 +150,7 @@ LOCAL_SRC_FILES := \
verifier.cpp \
ui.cpp
LOCAL_STATIC_LIBRARIES := libcrypto_utils libcrypto libbase
+LOCAL_CFLAGS := -Werror
include $(BUILD_STATIC_LIBRARY)
include \
diff --git a/applypatch/Android.mk b/applypatch/Android.mk
index 0fc6e3682..77e499ec6 100644
--- a/applypatch/Android.mk
+++ b/applypatch/Android.mk
@@ -36,6 +36,7 @@ LOCAL_STATIC_LIBRARIES += \
libcrypto \
libbz \
libz
+LOCAL_CFLAGS := -Werror
include $(BUILD_STATIC_LIBRARY)
# libimgpatch (static library)
@@ -49,6 +50,7 @@ LOCAL_C_INCLUDES += \
bootable/recovery
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES += libcrypto libbz libz
+LOCAL_CFLAGS := -Werror
include $(BUILD_STATIC_LIBRARY)
# libimgpatch (host static library)
@@ -63,6 +65,7 @@ LOCAL_C_INCLUDES += \
bootable/recovery
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES += libcrypto libbz libz
+LOCAL_CFLAGS := -Werror
include $(BUILD_HOST_STATIC_LIBRARY)
# applypatch (executable)
@@ -81,6 +84,7 @@ LOCAL_STATIC_LIBRARIES += \
libcrypto \
libbz
LOCAL_SHARED_LIBRARIES += libbase libz libcutils libc
+LOCAL_CFLAGS := -Werror
include $(BUILD_EXECUTABLE)
# imgdiff (host static executable)
@@ -95,5 +99,6 @@ LOCAL_STATIC_LIBRARIES += \
libdivsufsort64 \
libdivsufsort \
libz
+LOCAL_CFLAGS := -Werror
LOCAL_FORCE_STATIC_EXECUTABLE := true
include $(BUILD_HOST_EXECUTABLE)
diff --git a/bootloader_message/Android.mk b/bootloader_message/Android.mk
index 815ac67d7..a8c50819b 100644
--- a/bootloader_message/Android.mk
+++ b/bootloader_message/Android.mk
@@ -19,6 +19,7 @@ LOCAL_CLANG := true
LOCAL_SRC_FILES := bootloader_message.cpp
LOCAL_MODULE := libbootloader_message
LOCAL_STATIC_LIBRARIES := libbase libfs_mgr
+LOCAL_CFLAGS := -Werror
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
include $(BUILD_STATIC_LIBRARY)
diff --git a/edify/Android.mk b/edify/Android.mk
index 71cf7652a..b397045cf 100644
--- a/edify/Android.mk
+++ b/edify/Android.mk
@@ -16,6 +16,7 @@ LOCAL_SRC_FILES := \
$(edify_src_files) \
main.cpp
+LOCAL_CFLAGS := -Werror
LOCAL_CPPFLAGS := -g -O0
LOCAL_MODULE := edify
LOCAL_YACCFLAGS := -v
@@ -34,6 +35,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(edify_src_files)
+LOCAL_CFLAGS := -Werror
LOCAL_CPPFLAGS := -Wno-unused-parameter
LOCAL_CPPFLAGS += -Wno-deprecated-register
LOCAL_MODULE := libedify
diff --git a/minui/Android.mk b/minui/Android.mk
index 380ec2bfd..67b81fc6d 100644
--- a/minui/Android.mk
+++ b/minui/Android.mk
@@ -13,6 +13,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES += libadf
LOCAL_WHOLE_STATIC_LIBRARIES += libdrm
LOCAL_WHOLE_STATIC_LIBRARIES += libsync_recovery
LOCAL_STATIC_LIBRARIES += libpng
+LOCAL_CFLAGS := -Werror
LOCAL_MODULE := libminui
@@ -46,4 +47,5 @@ LOCAL_CLANG := true
LOCAL_MODULE := libminui
LOCAL_WHOLE_STATIC_LIBRARIES += libminui
LOCAL_SHARED_LIBRARIES := libpng
+LOCAL_CFLAGS := -Werror
include $(BUILD_SHARED_LIBRARY)
diff --git a/otafault/Android.mk b/otafault/Android.mk
index 47c04050b..82c267101 100644
--- a/otafault/Android.mk
+++ b/otafault/Android.mk
@@ -23,6 +23,7 @@ otafault_static_libs := \
libbase \
liblog
+LOCAL_CFLAGS := -Werror
LOCAL_SRC_FILES := config.cpp ota_io.cpp
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := libotafault
@@ -41,6 +42,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_C_INCLUDES := bootable/recovery
LOCAL_FORCE_STATIC_EXECUTABLE := true
diff --git a/recovery.cpp b/recovery.cpp
index c7d840dd6..7419bac00 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -318,12 +318,12 @@ get_args(int *argc, char ***argv) {
}
stage = strndup(boot.stage, sizeof(boot.stage));
- if (boot.command[0] != 0 && boot.command[0] != 255) {
+ if (boot.command[0] != 0) {
std::string boot_command = std::string(boot.command, sizeof(boot.command));
LOG(INFO) << "Boot command: " << boot_command;
}
- if (boot.status[0] != 0 && boot.status[0] != 255) {
+ if (boot.status[0] != 0) {
std::string boot_status = std::string(boot.status, sizeof(boot.status));
LOG(INFO) << "Boot status: " << boot_status;
}
@@ -340,7 +340,7 @@ get_args(int *argc, char ***argv) {
(*argv)[*argc] = strdup(arg);
}
LOG(INFO) << "Got arguments from boot message";
- } else if (boot.recovery[0] != 0 && boot.recovery[0] != 255) {
+ } else if (boot.recovery[0] != 0) {
std::string boot_recovery = std::string(boot.recovery, 20);
LOG(ERROR) << "Bad boot message\n" << "\"" <<boot_recovery << "\"";
}
diff --git a/tests/Android.mk b/tests/Android.mk
index 633b3c451..0754c7acf 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -19,6 +19,7 @@ LOCAL_PATH := $(call my-dir)
# Unit tests
include $(CLEAR_VARS)
LOCAL_CLANG := true
+LOCAL_CFLAGS := -Werror
LOCAL_MODULE := recovery_unit_test
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_STATIC_LIBRARIES := \
@@ -35,7 +36,7 @@ include $(BUILD_NATIVE_TEST)
# Component tests
include $(CLEAR_VARS)
LOCAL_CLANG := true
-LOCAL_CFLAGS += -Wno-unused-parameter
+LOCAL_CFLAGS += -Wno-unused-parameter -Werror
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := recovery_component_test
LOCAL_C_INCLUDES := bootable/recovery
diff --git a/uncrypt/Android.mk b/uncrypt/Android.mk
index bb276edd5..97fc70896 100644
--- a/uncrypt/Android.mk
+++ b/uncrypt/Android.mk
@@ -17,16 +17,15 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CLANG := true
-
LOCAL_SRC_FILES := uncrypt.cpp
-
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
-
LOCAL_MODULE := uncrypt
-
-LOCAL_STATIC_LIBRARIES := libbootloader_message libbase \
- liblog libfs_mgr libcutils \
-
+LOCAL_STATIC_LIBRARIES := libbootloader_message \
+ libbase \
+ liblog \
+ libfs_mgr \
+ libcutils
+LOCAL_CFLAGS := -Werror
LOCAL_INIT_RC := uncrypt.rc
include $(BUILD_EXECUTABLE)
diff --git a/update_verifier/Android.mk b/update_verifier/Android.mk
index 2bfd01622..090db998b 100644
--- a/update_verifier/Android.mk
+++ b/update_verifier/Android.mk
@@ -23,5 +23,6 @@ LOCAL_MODULE := update_verifier
LOCAL_SHARED_LIBRARIES := libbase libcutils libhardware liblog
LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
+LOCAL_CFLAGS := -Werror
include $(BUILD_EXECUTABLE)
diff --git a/updater/Android.mk b/updater/Android.mk
index e4d73a45a..507088dcd 100644
--- a/updater/Android.mk
+++ b/updater/Android.mk
@@ -61,7 +61,7 @@ LOCAL_STATIC_LIBRARIES += \
libtune2fs \
$(tune2fs_static_libraries)
-LOCAL_CFLAGS += -Wno-unused-parameter
+LOCAL_CFLAGS += -Wno-unused-parameter -Werror
LOCAL_C_INCLUDES += system/extras/ext4_utils
LOCAL_STATIC_LIBRARIES += \
libsparse_static \