From 112631b283b2779e4a85df6afca6c2d1d7b9a7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 15 May 2024 02:53:53 +0200 Subject: [PATCH] Fix compile errors caused by implict includes and casts There was some missing includes and implicit casts in the code what caused compile errors with new gcc, this commit fixes them. --- arch/arm/mmu.c | 1 + kernel/main.c | 2 ++ lib/debug/debug.c | 1 + lib/fs/ext2/dir.c | 6 +++--- platform/msm8953/platform.c | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm/mmu.c b/arch/arm/mmu.c index 4b186fe43..f2e5cac39 100644 --- a/arch/arm/mmu.c +++ b/arch/arm/mmu.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/kernel/main.c b/kernel/main.c index a40aa7d8f..203a55862 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/lib/debug/debug.c b/lib/debug/debug.c index b3e889d3c..5941c3b60 100644 --- a/lib/debug/debug.c +++ b/lib/debug/debug.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/fs/ext2/dir.c b/lib/fs/ext2/dir.c index 90dc42584..e71f965ba 100644 --- a/lib/fs/ext2/dir.c +++ b/lib/fs/ext2/dir.c @@ -198,7 +198,7 @@ int ext2_lookup(ext2_t *ext2, const char *_path, inodenum_t *inum) // © 2019 Mis012 - SPDX-License-Identifier: GPL-3.0 // from here till the end of file -status_t ext2_open_directory(fscookie *cookie, const char *path, dircookie **dircookie) { +status_t ext2_open_directory(fscookie *cookie, const char *path, dircookie **dcookie) { off_t entry_len = 0; ext2_dir_t *dir = malloc(sizeof(ext2_dir_t)); memset(dir, 0, sizeof(ext2_dir_t)); @@ -225,7 +225,7 @@ status_t ext2_open_directory(fscookie *cookie, const char *path, dircookie **dir dir->offset = 0; dir->length = entry_len; - *dircookie = dir; + *dcookie = (dircookie *) dir; return 0; } @@ -254,7 +254,7 @@ status_t ext2_read_directory(dircookie *dircookie, struct dirent *ent) { status_t ext2_close_directory(dircookie *dircookie) { ext2_dir_t *dir = (ext2_dir_t *)dircookie; - ext2_close_file(dir->file); + ext2_close_file((filecookie *)dir->file); free(dir); return 0; } diff --git a/platform/msm8953/platform.c b/platform/msm8953/platform.c index 408876b12..4d3c19270 100644 --- a/platform/msm8953/platform.c +++ b/platform/msm8953/platform.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include