diff --git a/pcsx2/IopBios.cpp b/pcsx2/IopBios.cpp index e11eb0b3f7..77eb911e61 100644 --- a/pcsx2/IopBios.cpp +++ b/pcsx2/IopBios.cpp @@ -58,7 +58,7 @@ void Hle_SetElfPath(const char* elfFileName) { DevCon.WriteLn("HLE Host: Will load ELF: %s\n", elfFileName); ghc::filesystem::path elf_path{elfFileName}; - hostRoot = elf_path.parent_path().concat("/"); + hostRoot = elf_path.parent_path().concat("/").string(); Console.WriteLn("HLE Host: Set 'host:' root path to: %s\n", hostRoot.c_str()); } @@ -260,7 +260,7 @@ namespace R3000A return translate_error(err); } - virtual int read(void* buf, u32 count) + virtual int read(void* buf, u32 count) /* Flawfinder: ignore */ { return translate_error(::read(fd, buf, count)); } @@ -300,16 +300,16 @@ namespace R3000A return 0; } - virtual int read(void* buf) + virtual int read(void* buf) /* Flawfinder: ignore */ { fio_dirent_t* hostcontent = (fio_dirent_t*)buf; if (dir == ghc::filesystem::end(dir)) return 0; - strcpy(hostcontent->name, dir->path().filename().c_str()); - host_stat(host_path(dir->path()), &hostcontent->stat); + strcpy(hostcontent->name, dir->path().filename().string().c_str()); + host_stat(host_path(dir->path().string()), &hostcontent->stat); - std::next(dir); + static_cast(std::next(dir)); /* This is for avoid warning of non used return value */ return 1; } @@ -552,7 +552,7 @@ namespace R3000A if (IOManDir* dir = getfd(fh)) { char buf[sizeof(fio_dirent_t)]; - v0 = dir->read(&buf); + v0 = dir->read(&buf); /* Flawfinder: ignore */ for (s32 i = 0; i < (s32)sizeof(fio_dirent_t); i++) iopMemWrite8(data + i, buf[i]); diff --git a/pcsx2/IopBios.h b/pcsx2/IopBios.h index e3be4049df..b2d8761845 100644 --- a/pcsx2/IopBios.h +++ b/pcsx2/IopBios.h @@ -48,7 +48,7 @@ public: virtual void close() = 0; virtual int lseek(s32 offset, s32 whence) { return -IOP_EIO; } - virtual int read(void* buf, u32 count) { return -IOP_EIO; } + virtual int read(void* buf, u32 count) { return -IOP_EIO; } /* Flawfinder: ignore */ virtual int write(void* buf, u32 count) { return -IOP_EIO; } }; @@ -64,7 +64,7 @@ public: virtual void close() = 0; - virtual int read(void* buf) { return -IOP_EIO; } + virtual int read(void* buf) { return -IOP_EIO; } /* Flawfinder: ignore */ }; typedef int (*irxHLE)(); // return 1 if handled, otherwise 0