diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2017-01-10 00:03:07 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2017-01-10 00:03:07 +0300 |
commit | 15ddf56a1e7bd69d7375621b46515883e0b66274 (patch) | |
tree | 7809e85c7a9c67d9bf112220e85cf2d91edb027b /tools | |
parent | 16a3c597744553557d38187f921abba6394e8206 (diff) | |
download | bdwgc-15ddf56a1e7bd69d7375621b46515883e0b66274.tar.gz |
Fix 'execvp argument incompatible pointer type' compiler warning (tools)
* tools/if_mach.c (main): Cast the 2nd argument of execvp to void* (to
avoid compiler warning as the argument of execvp() prototype could be
of "const char* const*" or "char**" type).
* tools/if_not_there.c (main): Likewise.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/if_mach.c | 2 | ||||
-rw-r--r-- | tools/if_not_there.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/if_mach.c b/tools/if_mach.c index 1b12a39d..18c40e55 100644 --- a/tools/if_mach.c +++ b/tools/if_mach.c @@ -13,7 +13,7 @@ int main(int argc, char **argv) && strcmp(OS_TYPE, argv[2]) != 0) return(0); fprintf(stderr, "^^^^Starting command^^^^\n"); fflush(stdout); - execvp(TRUSTED_STRING(argv[3]), argv+3); + execvp(TRUSTED_STRING(argv[3]), (void *)(argv + 3)); perror("Couldn't execute"); Usage: diff --git a/tools/if_not_there.c b/tools/if_not_there.c index 845b19af..68946d23 100644 --- a/tools/if_not_there.c +++ b/tools/if_not_there.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) #endif printf("^^^^Starting command^^^^\n"); fflush(stdout); - execvp(TRUSTED_STRING(argv[2]), argv+2); + execvp(TRUSTED_STRING(argv[2]), (void *)(argv + 2)); exit(1); Usage: |