From 2cd4a60b2f8dd3fc5196fe97c6f1882e2e8ebe0d Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 27 Mar 2022 17:07:01 +0200 Subject: init/tar: fix some compiler warnings --- src/init/tar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/init/tar.c b/src/init/tar.c index e0843e7..1f1c42e 100644 --- a/src/init/tar.c +++ b/src/init/tar.c @@ -6,7 +6,7 @@ #define BUF_SIZE 64 static int tar_open(const char *path, int len, void *base, size_t base_len); -static int tar_read(struct fs_wait_response *res, void *base, size_t base_len); +static void tar_read(struct fs_wait_response *res, void *base, size_t base_len); static int tar_size(void *sector); static void *tar_find(const char *path, size_t path_len, void *base, size_t base_len); static int oct_parse(char *str, size_t len); @@ -47,14 +47,14 @@ static int tar_open(const char *path, int len, void *base, size_t base_len) { * returning a fake one. this isn't a full entry because i'm currently too * lazy to create a full one - thus, it has to be special cased in tar_read */ if (len == 0) - return root_fakemeta; + return (int)root_fakemeta; - ptr = tar_find(path, len, base, ~0); + ptr = tar_find(path, len, base, base_len); if (!ptr) return -1; return (int)ptr; } -static int tar_read(struct fs_wait_response *res, void *base, size_t base_len) { +static void tar_read(struct fs_wait_response *res, void *base, size_t base_len) { void *meta = (void*)res->id; char type = *(char*)(meta + 156); size_t meta_len; -- cgit v1.2.3