aboutsummaryrefslogtreecommitdiffstats
path: root/tools/nv_data-md5.c
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-03-12 19:20:34 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-03-17 18:56:21 +0100
commit9d236fe7d27bf8d3e02db4c01bb9bb0eead49157 (patch)
tree2a885cc7a300ab6aea8633d3336da499b3bc7073 /tools/nv_data-md5.c
parent7791f472f3d545b5bf0cd589f49e47a3dc1cc932 (diff)
downloadhardware_replicant_libsamsung-ipc-9d236fe7d27bf8d3e02db4c01bb9bb0eead49157.tar.gz
hardware_replicant_libsamsung-ipc-9d236fe7d27bf8d3e02db4c01bb9bb0eead49157.tar.bz2
hardware_replicant_libsamsung-ipc-9d236fe7d27bf8d3e02db4c01bb9bb0eead49157.zip
tools: fix nv-data-md5 compilation with Replicant 6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5
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 <GNUtoo@cyberdimension.org>
Diffstat (limited to 'tools/nv_data-md5.c')
-rw-r--r--tools/nv_data-md5.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/nv_data-md5.c b/tools/nv_data-md5.c
index e8c9fc8..5edb257 100644
--- a/tools/nv_data-md5.c
+++ b/tools/nv_data-md5.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sysexits.h>
#include <sys/types.h>
@@ -100,4 +101,6 @@ int main(int argc, char *argv[])
error:
if (client != NULL)
ipc_client_destroy(client);
+
+ return EX_SOFTWARE;
}