diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-12-11 13:46:56 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-12-11 13:46:56 -0800 |
commit | f730aecd3d939655f28ebd292b98eed754d8ad36 (patch) | |
tree | dd5291f84e87ca6a3b9b2d33f218d7fcd14ddb3e | |
parent | 1d789120225d8ce63c368797e644cc9ccc003ce4 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |