summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2020-08-23 16:37:54 -0400
committerGravatar Lioncash2020-08-23 16:37:57 -0400
commit85db5f4091b62ea7be17251b135374858d9e52c7 (patch)
treec0fa9e9affde1234ea5a31c4b9abb785dbfe1007 /src
parentMerge pull request #4546 from lioncash/telemetry (diff)
downloadyuzu-85db5f4091b62ea7be17251b135374858d9e52c7.tar.gz
yuzu-85db5f4091b62ea7be17251b135374858d9e52c7.tar.xz
yuzu-85db5f4091b62ea7be17251b135374858d9e52c7.zip
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().
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 26fd87f58..84ff1ff89 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -844,8 +844,7 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
844 return; 844 return;
845 } 845 }
846 846
847 FileSys::StorageId id; 847 FileSys::StorageId id{};
848
849 switch (parameters.space_id) { 848 switch (parameters.space_id) {
850 case FileSys::SaveDataSpaceId::NandUser: 849 case FileSys::SaveDataSpaceId::NandUser:
851 id = FileSys::StorageId::NandUser; 850 id = FileSys::StorageId::NandUser;
@@ -857,6 +856,10 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
857 case FileSys::SaveDataSpaceId::NandSystem: 856 case FileSys::SaveDataSpaceId::NandSystem:
858 id = FileSys::StorageId::NandSystem; 857 id = FileSys::StorageId::NandSystem;
859 break; 858 break;
859 case FileSys::SaveDataSpaceId::TemporaryStorage:
860 case FileSys::SaveDataSpaceId::ProperSystem:
861 case FileSys::SaveDataSpaceId::SafeMode:
862 UNREACHABLE();
860 } 863 }
861 864
862 auto filesystem = 865 auto filesystem =