diff options
| author | 2017-01-29 17:41:19 +0100 | |
|---|---|---|
| committer | 2017-01-29 21:50:25 +0100 | |
| commit | f352a741d3b404f244d878f38d1f1d43250447d3 (patch) | |
| tree | 952ac6e18ec4b0d446f2e60db0e3162e09c2aa02 /src/core/file_sys | |
| parent | core: fix archive_sdmc.cpp warnings about unhandled enumeration value on OSX (diff) | |
| download | yuzu-f352a741d3b404f244d878f38d1f1d43250447d3.tar.gz yuzu-f352a741d3b404f244d878f38d1f1d43250447d3.tar.xz yuzu-f352a741d3b404f244d878f38d1f1d43250447d3.zip | |
core: fix savedata_archive.cpp warnings about unhandled enumeration values on OSX
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/savedata_archive.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/file_sys/savedata_archive.cpp b/src/core/file_sys/savedata_archive.cpp index f2e6a06bc..f540c4a93 100644 --- a/src/core/file_sys/savedata_archive.cpp +++ b/src/core/file_sys/savedata_archive.cpp | |||
| @@ -57,6 +57,8 @@ ResultVal<std::unique_ptr<FileBackend>> SaveDataArchive::OpenFile(const Path& pa | |||
| 57 | FileUtil::CreateEmptyFile(full_path); | 57 | FileUtil::CreateEmptyFile(full_path); |
| 58 | } | 58 | } |
| 59 | break; | 59 | break; |
| 60 | case PathParser::FileFound: | ||
| 61 | break; // Expected 'success' case | ||
| 60 | } | 62 | } |
| 61 | 63 | ||
| 62 | FileUtil::IOFile file(full_path, mode.write_flag ? "r+b" : "rb"); | 64 | FileUtil::IOFile file(full_path, mode.write_flag ? "r+b" : "rb"); |
| @@ -91,6 +93,8 @@ ResultCode SaveDataArchive::DeleteFile(const Path& path) const { | |||
| 91 | case PathParser::NotFound: | 93 | case PathParser::NotFound: |
| 92 | LOG_ERROR(Service_FS, "File not found %s", full_path.c_str()); | 94 | LOG_ERROR(Service_FS, "File not found %s", full_path.c_str()); |
| 93 | return ERROR_FILE_NOT_FOUND; | 95 | return ERROR_FILE_NOT_FOUND; |
| 96 | case PathParser::FileFound: | ||
| 97 | break; // Expected 'success' case | ||
| 94 | } | 98 | } |
| 95 | 99 | ||
| 96 | if (FileUtil::Delete(full_path)) { | 100 | if (FileUtil::Delete(full_path)) { |
| @@ -139,6 +143,8 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou | |||
| 139 | case PathParser::FileFound: | 143 | case PathParser::FileFound: |
| 140 | LOG_ERROR(Service_FS, "Unexpected file or directory %s", full_path.c_str()); | 144 | LOG_ERROR(Service_FS, "Unexpected file or directory %s", full_path.c_str()); |
| 141 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; | 145 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; |
| 146 | case PathParser::DirectoryFound: | ||
| 147 | break; // Expected 'success' case | ||
| 142 | } | 148 | } |
| 143 | 149 | ||
| 144 | if (deleter(full_path)) { | 150 | if (deleter(full_path)) { |
| @@ -182,6 +188,8 @@ ResultCode SaveDataArchive::CreateFile(const FileSys::Path& path, u64 size) cons | |||
| 182 | case PathParser::FileFound: | 188 | case PathParser::FileFound: |
| 183 | LOG_ERROR(Service_FS, "%s already exists", full_path.c_str()); | 189 | LOG_ERROR(Service_FS, "%s already exists", full_path.c_str()); |
| 184 | return ERROR_FILE_ALREADY_EXISTS; | 190 | return ERROR_FILE_ALREADY_EXISTS; |
| 191 | case PathParser::NotFound: | ||
| 192 | break; // Expected 'success' case | ||
| 185 | } | 193 | } |
| 186 | 194 | ||
| 187 | if (size == 0) { | 195 | if (size == 0) { |
| @@ -225,6 +233,8 @@ ResultCode SaveDataArchive::CreateDirectory(const Path& path) const { | |||
| 225 | case PathParser::FileFound: | 233 | case PathParser::FileFound: |
| 226 | LOG_ERROR(Service_FS, "%s already exists", full_path.c_str()); | 234 | LOG_ERROR(Service_FS, "%s already exists", full_path.c_str()); |
| 227 | return ERROR_DIRECTORY_ALREADY_EXISTS; | 235 | return ERROR_DIRECTORY_ALREADY_EXISTS; |
| 236 | case PathParser::NotFound: | ||
| 237 | break; // Expected 'success' case | ||
| 228 | } | 238 | } |
| 229 | 239 | ||
| 230 | if (FileUtil::CreateDir(mount_point + path.AsString())) { | 240 | if (FileUtil::CreateDir(mount_point + path.AsString())) { |
| @@ -269,6 +279,8 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SaveDataArchive::OpenDirectory( | |||
| 269 | case PathParser::FileFound: | 279 | case PathParser::FileFound: |
| 270 | LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str()); | 280 | LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str()); |
| 271 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; | 281 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY; |
| 282 | case PathParser::DirectoryFound: | ||
| 283 | break; // Expected 'success' case | ||
| 272 | } | 284 | } |
| 273 | 285 | ||
| 274 | auto directory = std::make_unique<DiskDirectory>(full_path); | 286 | auto directory = std::make_unique<DiskDirectory>(full_path); |