From 85db5f4091b62ea7be17251b135374858d9e52c7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 23 Aug 2020 16:37:54 -0400 Subject: 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(). --- src/core/hle/service/filesystem/fsp_srv.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core/hle/service/filesystem') 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) { return; } - FileSys::StorageId id; - + FileSys::StorageId id{}; switch (parameters.space_id) { case FileSys::SaveDataSpaceId::NandUser: id = FileSys::StorageId::NandUser; @@ -857,6 +856,10 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) { case FileSys::SaveDataSpaceId::NandSystem: id = FileSys::StorageId::NandSystem; break; + case FileSys::SaveDataSpaceId::TemporaryStorage: + case FileSys::SaveDataSpaceId::ProperSystem: + case FileSys::SaveDataSpaceId::SafeMode: + UNREACHABLE(); } auto filesystem = -- cgit v1.2.3