From cfb77f33ac3db514ed3e6de607a2ec27b65713a5 Mon Sep 17 00:00:00 2001 From: Marek Ledworowski Date: Mon, 3 Nov 2025 21:42:42 +0100 Subject: [PATCH] clang --- src/core/file_sys/fs.h | 1 - src/core/file_sys/hostio/host_io.h | 4 +--- src/core/file_sys/hostio/host_io_posix.h | 4 ++-- src/core/file_sys/hostio/host_io_virtual.h | 2 +- src/core/file_sys/hostio/src/host_io_win32.cpp | 3 --- src/core/libraries/avplayer/avplayer_source.cpp | 3 ++- src/core/libraries/kernel/file_system.cpp | 2 +- 7 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/core/file_sys/fs.h b/src/core/file_sys/fs.h index 79bf434ed..b8dc41d27 100644 --- a/src/core/file_sys/fs.h +++ b/src/core/file_sys/fs.h @@ -102,7 +102,6 @@ public: File* GetResolver(int d); File* GetFile(const std::filesystem::path& host_name); - private: std::vector m_files; std::mutex m_mutex; diff --git a/src/core/file_sys/hostio/host_io.h b/src/core/file_sys/hostio/host_io.h index 9bed12dac..3ce0e79e1 100644 --- a/src/core/file_sys/hostio/host_io.h +++ b/src/core/file_sys/hostio/host_io.h @@ -2,8 +2,6 @@ #pragma once -#include - #include "host_io_posix.h" #include "host_io_virtual.h" #include "host_io_win32.h" @@ -17,7 +15,7 @@ using HostVIO = HostIODriver::HostIO_Virtual; #ifdef __linux__ using HostIO = HostIODriver::HostIO_POSIX; #elif _WIN32 -//#error Contributors needed +// #error Contributors needed using HostIO = HostIODriver::HostIO_Win32; #else #warning This architecture isn't supported by HostIO diff --git a/src/core/file_sys/hostio/host_io_posix.h b/src/core/file_sys/hostio/host_io_posix.h index 608e51e98..ad5a9a407 100644 --- a/src/core/file_sys/hostio/host_io_posix.h +++ b/src/core/file_sys/hostio/host_io_posix.h @@ -6,8 +6,8 @@ #include -#include "core/file_sys/quasifs/quasi_types.h" #include "core/file_sys/quasifs/quasi_sys_fcntl.h" +#include "core/file_sys/quasifs/quasi_types.h" #include "core/libraries/kernel/file_system.h" #include "src/host_io_base.h" @@ -86,7 +86,7 @@ public: int Link(const fs::path& src, const fs::path& dst) override; int Unlink(const fs::path& path) override; int LinkSymbolic(const fs::path& src, const fs::path& dst) override; - + int Flush(const int fd) override; int FSync(const int fd) override; u64 LSeek(const int fd, u64 offset, QuasiFS::SeekOrigin origin) override; diff --git a/src/core/file_sys/hostio/host_io_virtual.h b/src/core/file_sys/hostio/host_io_virtual.h index 763f61926..931f22f3e 100644 --- a/src/core/file_sys/hostio/host_io_virtual.h +++ b/src/core/file_sys/hostio/host_io_virtual.h @@ -2,8 +2,8 @@ #pragma once -#include "core/libraries/kernel/file_system.h" #include "core/file_sys/quasifs/quasi_types.h" +#include "core/libraries/kernel/file_system.h" #include "src/host_io_base.h" namespace HostIODriver { diff --git a/src/core/file_sys/hostio/src/host_io_win32.cpp b/src/core/file_sys/hostio/src/host_io_win32.cpp index 5d72f8d28..e5941c924 100644 --- a/src/core/file_sys/hostio/src/host_io_win32.cpp +++ b/src/core/file_sys/hostio/src/host_io_win32.cpp @@ -1,6 +1,5 @@ // INAA License @marecl 2025 - #include "common/logging/log.h" #include "../host_io_win32.h" @@ -10,8 +9,6 @@ namespace HostIODriver { HostIO_Win32::HostIO_Win32() = default; HostIO_Win32::~HostIO_Win32() = default; - - int HostIO_Win32::Creat(const fs::path& path, u16 mode) { LOG_ERROR(Kernel_Fs, "Stub called in HostIO_Base: {}:{}", __FILE__, __LINE__); return -38; diff --git a/src/core/libraries/avplayer/avplayer_source.cpp b/src/core/libraries/avplayer/avplayer_source.cpp index c9fe0cb39..b7dbd75c6 100644 --- a/src/core/libraries/avplayer/avplayer_source.cpp +++ b/src/core/libraries/avplayer/avplayer_source.cpp @@ -50,7 +50,8 @@ bool AvPlayerSource::Init(const AvPlayerInitData& init_data, std::string_view pa std::filesystem::path filepath{}; qfs->GetHostPath(filepath, path); // may get funky with char/wchar path on *dows - if (AVPLAYER_IS_ERROR(avformat_open_input(&context, filepath.string().c_str(), nullptr, nullptr))) { + if (AVPLAYER_IS_ERROR( + avformat_open_input(&context, filepath.string().c_str(), nullptr, nullptr))) { return false; } } diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index 2230f847d..a7c43bde2 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -11,7 +11,6 @@ #include "common/scope_exit.h" #include "common/singleton.h" -#include "core/file_sys/fs.h" #include "core/file_sys/devices/console_device.h" #include "core/file_sys/devices/deci_tty6_device.h" #include "core/file_sys/devices/logger.h" @@ -21,6 +20,7 @@ #include "core/file_sys/devices/srandom_device.h" #include "core/file_sys/directories/normal_directory.h" #include "core/file_sys/directories/pfs_directory.h" +#include "core/file_sys/fs.h" #include "core/libraries/kernel/file_system.h" #include "core/libraries/kernel/orbis_error.h"