From 9d236fe7d27bf8d3e02db4c01bb9bb0eead49157 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Fri, 12 Mar 2021 19:20:34 +0100 Subject: tools: fix nv-data-md5 compilation with Replicant 6 When compiling nv-data-md5 under Replicant 6 we have: hardware/replicant/libsamsung-ipc/tools/nv_data-md5.c: In function 'main': hardware/replicant/libsamsung-ipc/tools/nv_data-md5.c:103:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1: some warnings being treated as errors So we simply need to add a return in the error path. While we're at it, we use an exit code referenced in sysexits.h to follow a standard. This can help differentiating between different types of errors. Thanks to that, it can also simplify the code when writing tests. As Android doesn't have sysexits.h, we also need to use the one that has been copied inside libsamsung-ipc in tools/include/glibc, else it would also fail to compile because of the missing header file. Signed-off-by: Denis 'GNUtoo' Carikli --- Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index c0a5d35..ffa2bd8 100644 --- a/Android.mk +++ b/Android.mk @@ -219,7 +219,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := tools/nv_data-md5.c -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/tools/include/glibc LOCAL_SHARED_LIBRARIES := libsamsung-ipc -- cgit v1.2.3