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/stdio/stdin.c | |
parent | ec91e81a4fcfd7ee6bc4150f06d8740e82f808da (diff) |
LibC: Reduce warnings in code
Diffstat (limited to 'userland/libc/stdio/stdin.c')
-rw-r--r-- | userland/libc/stdio/stdin.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/userland/libc/stdio/stdin.c b/userland/libc/stdio/stdin.c index c424cc5..bc5c6f2 100644 --- a/userland/libc/stdio/stdin.c +++ b/userland/libc/stdio/stdin.c @@ -1,9 +1,11 @@ #include <assert.h> +#include <math.h> #include <stdio.h> +#include <stdlib.h> #include <unistd.h> size_t raw_write_fd(FILE *f, const unsigned char *s, size_t l) { - int rc = pwrite(f->fd, s, l, f->offset_in_file); + int rc = pwrite(f->fd, (char *)s, l, f->offset_in_file); if (rc == -1) { f->has_error = 1; return 0; @@ -84,6 +86,7 @@ size_t read_fd(FILE *f, unsigned char *s, size_t l) { return read_fd(f, s, l); } assert(0); + return 0; } int seek_fd(FILE *stream, long offset, int whence) { |