diff options
author | Anton Kling <anton@kling.gg> | 2023-11-23 00:52:35 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-11-23 00:52:35 +0100 |
commit | 81819f711e6d1f9216f688da8ecbbc682d106d9c (patch) | |
tree | 0f0df7c43cc5bc956c2c067e55766bfa90823a7f /userland/libc/unistd | |
parent | ec91e81a4fcfd7ee6bc4150f06d8740e82f808da (diff) |
LibC: Reduce warnings in code
Diffstat (limited to 'userland/libc/unistd')
-rw-r--r-- | userland/libc/unistd/execvp.c | 4 | ||||
-rw-r--r-- | userland/libc/unistd/getopt.c | 3 | ||||
-rw-r--r-- | userland/libc/unistd/unlink.c | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/userland/libc/unistd/execvp.c b/userland/libc/unistd/execvp.c index 573e822..e38b4b7 100644 --- a/userland/libc/unistd/execvp.c +++ b/userland/libc/unistd/execvp.c @@ -1,8 +1,8 @@ -#include <unistd.h> #include <syscall.h> +#include <unistd.h> // FIXME: Path resolution int execvp(const char *file, char *const argv[]) { - struct SYS_EXEC_PARAMS args = {.path = file, .argv = argv}; + struct SYS_EXEC_PARAMS args = {.path = file, .argv = (char **)argv}; return syscall(SYS_EXEC, &args, 0, 0, 0, 0); } diff --git a/userland/libc/unistd/getopt.c b/userland/libc/unistd/getopt.c index a026b59..5b13d16 100644 --- a/userland/libc/unistd/getopt.c +++ b/userland/libc/unistd/getopt.c @@ -6,6 +6,9 @@ char *optarg; // https://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html int getopt(int argc, char *const argv[], const char *optstring) { + (void)argc; + (void)argv; + (void)optstring; // TODO optind = 1; optarg = NULL; diff --git a/userland/libc/unistd/unlink.c b/userland/libc/unistd/unlink.c index ccac0df..7d7aa1c 100644 --- a/userland/libc/unistd/unlink.c +++ b/userland/libc/unistd/unlink.c @@ -1,4 +1,5 @@ #include <unistd.h> +#include <stdio.h> int unlink(const char *path) { // TODO |