[Replicant] [libsamsung-ipc] [PATCH 4/4] tools: fix nv-data-md5 compilation with Replicant 6
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Wed Mar 17 17:55:04 UTC 2021
On Wed, 17 Mar 2021 18:37:41 +0100
Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org> wrote:
> When compiling nv-data-md5 under Replicant 6 we have:
> In function 'main':
> 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.
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
> tools/nv_data-md5.c | 3 +++
> 1 file changed, 3 insertions(+)
> 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>
I forgot to add the following in Android.mk:
> -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
> +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/tools/include/glibc
As I tested with Replicant 6 only before adding sysexits.h (and with
guix build after) my tests didn't pick that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the Replicant