mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
fsp_srv: Resolve -Wmaybe_uninitialized warning in OpenSaveDataFileSystem()
Initialize id to a deterministic value and also mark the unreachable cases in the switch with UNREACHABLE().
This commit is contained in:
parent
3ea3de4ecd
commit
85db5f4091
1 changed files with 5 additions and 2 deletions
|
@ -844,8 +844,7 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSys::StorageId id;
|
FileSys::StorageId id{};
|
||||||
|
|
||||||
switch (parameters.space_id) {
|
switch (parameters.space_id) {
|
||||||
case FileSys::SaveDataSpaceId::NandUser:
|
case FileSys::SaveDataSpaceId::NandUser:
|
||||||
id = FileSys::StorageId::NandUser;
|
id = FileSys::StorageId::NandUser;
|
||||||
|
@ -857,6 +856,10 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
case FileSys::SaveDataSpaceId::NandSystem:
|
case FileSys::SaveDataSpaceId::NandSystem:
|
||||||
id = FileSys::StorageId::NandSystem;
|
id = FileSys::StorageId::NandSystem;
|
||||||
break;
|
break;
|
||||||
|
case FileSys::SaveDataSpaceId::TemporaryStorage:
|
||||||
|
case FileSys::SaveDataSpaceId::ProperSystem:
|
||||||
|
case FileSys::SaveDataSpaceId::SafeMode:
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto filesystem =
|
auto filesystem =
|
||||||
|
|
Loading…
Reference in a new issue