From e4bd927cc7c756de5f3005824b63a7a6d827e1ee Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 28 Nov 2019 11:17:20 -0800 Subject: [PATCH] cast ucert_argv to proper type when passing to execv Fixes warnings: warning: passing argument 2 of 'execv' from incompatible pointer type [-Wincompatible-pointer-types] 254 | execv(usign_argv[0], usign_argv) Signed-off-by: Rosen Penev --- usign-exec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usign-exec.c b/usign-exec.c index 949e83e..85e5f95 100644 --- a/usign-exec.c +++ b/usign-exec.c @@ -74,9 +74,9 @@ int usign_s(const char *msgfile, const char *seckeyfile, const char *sigfile, bo case 0: if ( #ifdef UCERT_HOST_BUILD - execvp(usign_argv[0], usign_argv) + execvp(usign_argv[0], (char *const *)usign_argv) #else - execv(usign_argv[0], usign_argv) + execv(usign_argv[0], (char *const *)usign_argv) #endif ) return -1; @@ -143,9 +143,9 @@ static int usign_f(char *fingerprint, const char *pubkeyfile, const char *seckey if ( #ifdef UCERT_HOST_BUILD - execvp(usign_argv[0], usign_argv) + execvp(usign_argv[0], (char *const *)usign_argv) #else - execv(usign_argv[0], usign_argv) + execv(usign_argv[0], (char *const *)usign_argv) #endif ) return -1; @@ -249,9 +249,9 @@ int usign_v(const char *msgfile, const char *pubkeyfile, case 0: if ( #ifdef UCERT_HOST_BUILD - execvp(usign_argv[0], usign_argv) + execvp(usign_argv[0], (char *const *)usign_argv) #else - execv(usign_argv[0], usign_argv) + execv(usign_argv[0], (char *const *)usign_argv) #endif ) return -1; -- 2.25.1