summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-12-11 13:46:56 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-12-11 13:46:56 -0800
commitf730aecd3d939655f28ebd292b98eed754d8ad36 (patch)
treedd5291f84e87ca6a3b9b2d33f218d7fcd14ddb3e
parent1d789120225d8ce63c368797e644cc9ccc003ce4 (diff)
Fix -Wincompatible-pointer-types warning (Issue #3)
Fixes warning from gcc 13 that is becoming an error in gcc 14 imake.c: In function ‘doit’: imake.c:797:29: error: passing argument 2 of ‘execvp’ from incompatible pointer type [-Werror=incompatible-pointer-types] 797 | execvp(cmd, argv); | ^~~~ | | | const char ** In file included from imake.c:172: /usr/include/unistd.h:359:33: note: expected ‘char * const*’ but argument is of type ‘const char **’ 359 | extern int execvp(const char *, char *const *); | ^~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--imake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imake.c b/imake.c
index 4597f6c..10350ea 100644
--- a/imake.c
+++ b/imake.c
@@ -794,7 +794,7 @@ doit(FILE *outfd, const char *cmd, const char **argv)
showargs(argv);
if (outfd)
dup2(fileno(outfd), 1);
- execvp(cmd, argv);
+ execvp(cmd, (char * const *) argv);
LogFatal("Cannot exec %s.", cmd);
}
#endif