libstrat: enable -Wextra, -Werror

This caught an embarrassingly large number of bugs.
This commit is contained in:
Michael Scire 2021-10-06 15:20:48 -07:00
parent e1fbf27398
commit 7ca83c9d3b
160 changed files with 691 additions and 152 deletions

View file

@ -1170,6 +1170,8 @@ namespace ams::htcfs {
}
Result ClientImpl::ReadFile(s64 *out, void *buffer, s32 handle, s64 offset, s64 buffer_size, fs::ReadOption option) {
AMS_UNUSED(option);
/* Lock ourselves. */
std::scoped_lock lk(m_mutex);
@ -1229,6 +1231,8 @@ namespace ams::htcfs {
}
Result ClientImpl::ReadFileLarge(s64 *out, void *buffer, s32 handle, s64 offset, s64 buffer_size, fs::ReadOption option) {
AMS_UNUSED(option);
/* Check our buffer size. */
R_UNLESS(util::IsIntValueRepresentable<size_t>(buffer_size), htcfs::ResultInvalidArgument());