Fix warning and disable dummy static analysis warnings

This commit is contained in:
Francisco Javier Trujillo Mata 2021-04-27 20:51:06 +02:00 committed by refractionpcsx2
parent b2618ba148
commit b373763924
2 changed files with 9 additions and 9 deletions

View File

@ -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<void>(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<IOManDir>(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]);

View File

@ -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