Fix several warnings

A small, nonexhaustive set of warning fixes. The DiscIO Volume change
is a workaround for a GCC bug [1] that causes returning an unengaged
std::optional to emit annoying -Wmaybe-uninitialized warnings.
This last change alone fixes pages upon pages of warnings since
Volume.h is included from several files.

-Wstringop-truncation is another irrelevant warning for us, but
unfortunately there seems to be no way to disable it without
adding ugly pragmas wherever the warning appears.
This commit is contained in:
Léo Lam committed 2020-01-04 12:11:39 +01:00
1 parent 94c5460693
commit ad75215bb0
10 files changed
+12 -12

No files matched your search

+1 -1
View File
@@ -303,7 +303,7 @@ private:
struct SmallBlockAccessors : Accessors
{
SmallBlockAccessors(u8** alloc_base, u32 size) : alloc_base(alloc_base), size(size) {}
SmallBlockAccessors(u8** alloc_base_, u32 size_) : alloc_base{alloc_base_}, size{size_} {}
bool IsValidAddress(u32 address) const override
{