From: Rosen Penev Date: Thu, 28 Nov 2019 19:17:20 +0000 (-0800) Subject: cast ucert_argv to proper type when passing to execv X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e4bd927cc7c756de5f3005824b63a7a6d827e1ee;p=oweals%2Fucert.git 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 --- 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;