libstrat: enable -Wextra, -Werror
This caught an embarrassingly large number of bugs.
This commit is contained in:
@@ -92,6 +92,7 @@ namespace ams::fs {
|
||||
.dir = InvalidPosition,
|
||||
.file = InvalidPosition,
|
||||
};
|
||||
AMS_UNUSED(info);
|
||||
|
||||
Position new_pos = 0;
|
||||
R_TRY_CATCH(this->dir_table.Add(std::addressof(new_pos), new_key, new_entry)) {
|
||||
@@ -221,6 +222,8 @@ namespace ams::fs {
|
||||
RomDirectoryEntry entry = {};
|
||||
R_TRY(this->GetDirectoryEntry(std::addressof(entry), id));
|
||||
|
||||
AMS_UNUSED(out);
|
||||
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
@@ -275,6 +278,7 @@ namespace ams::fs {
|
||||
AMS_ASSERT(out != nullptr);
|
||||
AMS_ASSERT(find != nullptr);
|
||||
AMS_ASSERT(length > RomPathTool::MaxPathLength);
|
||||
AMS_UNUSED(length);
|
||||
|
||||
R_UNLESS(find->next_dir != InvalidPosition, fs::ResultDbmFindFinished());
|
||||
|
||||
@@ -294,6 +298,7 @@ namespace ams::fs {
|
||||
AMS_ASSERT(out != nullptr);
|
||||
AMS_ASSERT(find != nullptr);
|
||||
AMS_ASSERT(length > RomPathTool::MaxPathLength);
|
||||
AMS_UNUSED(length);
|
||||
|
||||
R_UNLESS(find->next_file != InvalidPosition, fs::ResultDbmFindFinished());
|
||||
|
||||
@@ -544,6 +549,8 @@ namespace ams::fs {
|
||||
RomDirectoryEntry entry = {};
|
||||
R_TRY(this->GetDirectoryEntry(std::addressof(pos), std::addressof(entry), key));
|
||||
|
||||
AMS_UNUSED(out);
|
||||
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,8 @@ namespace ams::fs {
|
||||
}
|
||||
|
||||
Result FileHandleStorage::OperateRange(void *dst, size_t dst_size, OperationId op_id, s64 offset, s64 size, const void *src, size_t src_size) {
|
||||
AMS_UNUSED(src, src_size);
|
||||
|
||||
switch (op_id) {
|
||||
case OperationId::QueryRange:
|
||||
/* Validate buffer and size. */
|
||||
|
||||
Reference in New Issue
Block a user