diff options
| author | 2017-01-29 17:35:50 +0100 | |
|---|---|---|
| committer | 2017-01-29 21:49:36 +0100 | |
| commit | c4f9cd35597a612c392c4a4394e48c0030f7abf7 (patch) | |
| tree | 8c896527a3ab8dccedf02496ab2320ed021055ab /src/core/file_sys | |
| parent | core: fix archive_extsavedata.cpp warning on OSX (diff) | |
| download | yuzu-c4f9cd35597a612c392c4a4394e48c0030f7abf7.tar.gz yuzu-c4f9cd35597a612c392c4a4394e48c0030f7abf7.tar.xz yuzu-c4f9cd35597a612c392c4a4394e48c0030f7abf7.zip | |
core: fix archive_sdmc.cpp warnings about unhandled enumeration value on OSX
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/archive_sdmc.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index 333dfb92e..72ff05c65 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp | |||
| @@ -72,6 +72,8 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCArchive::OpenFileBase(const Path& pa | |||
| 72 | FileUtil::CreateEmptyFile(full_path); | 72 | FileUtil::CreateEmptyFile(full_path); |
| 73 | } | 73 | } |
| 74 | break; | 74 | break; |
| 75 | case PathParser::FileFound: | ||
| 76 | break; // Expected 'success' case | ||
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | FileUtil::IOFile file(full_path, mode.write_flag ? "r+b" : "rb"); | 79 | FileUtil::IOFile file(full_path, mode.write_flag ? "r+b" : "rb"); |
| @@ -106,6 +108,8 @@ ResultCode SDMCArchive::DeleteFile(const Path& path) const { | |||
| 106 | case PathParser::DirectoryFound: | 108 | case PathParser::DirectoryFound: |
| 107 | LOG_ERROR(Service_FS, "%s is not a file", full_path.c_str()); | 109 | LOG_ERROR(Service_FS, "%s is not a file", full_path.c_str()); |
| 108 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | 110 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; |
| 111 | case PathParser::FileFound: | ||
| 112 | break; // Expected 'success' case | ||
| 109 | } | 113 | } |
| 110 | 114 | ||
| 111 | if (FileUtil::Delete(full_path)) { | 115 | if (FileUtil::Delete(full_path)) { |
| @@ -154,6 +158,8 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou | |||
| 154 | case PathParser::FileFound: | 158 | case PathParser::FileFound: |
| 155 | LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str()); | 159 | LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str()); |
| 156 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | 160 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; |
| 161 | case PathParser::DirectoryFound: | ||
| 162 | break; // Expected 'success' case | ||
| 157 | } | 163 | } |
| 158 | 164 | ||
| 159 | if (deleter(full_path)) { | 165 | if (deleter(full_path)) { |
| @@ -197,6 +203,8 @@ ResultCode SDMCArchive::CreateFile(const FileSys::Path& path, u64 size) const { | |||
| 197 | case PathParser::FileFound: | 203 | case PathParser::FileFound: |
| 198 | LOG_ERROR(Service_FS, "%s already exists", full_path.c_str()); | 204 | LOG_ERROR(Service_FS, "%s already exists", full_path.c_str()); |
| 199 | return ERROR_ALREADY_EXISTS; | 205 | return ERROR_ALREADY_EXISTS; |
| 206 | case PathParser::NotFound: | ||
| 207 | break; // Expected 'success' case | ||
| 200 | } | 208 | } |
| 201 | 209 | ||
| 202 | if (size == 0) { | 210 | if (size == 0) { |
| @@ -238,6 +246,8 @@ ResultCode SDMCArchive::CreateDirectory(const Path& path) const { | |||
| 238 | case PathParser::FileFound: | 246 | case PathParser::FileFound: |
| 239 | LOG_ERROR(Service_FS, "%s already exists", full_path.c_str()); | 247 | LOG_ERROR(Service_FS, "%s already exists", full_path.c_str()); |
| 240 | return ERROR_ALREADY_EXISTS; | 248 | return ERROR_ALREADY_EXISTS; |
| 249 | case PathParser::NotFound: | ||
| 250 | break; // Expected 'success' case | ||
| 241 | } | 251 | } |
| 242 | 252 | ||
| 243 | if (FileUtil::CreateDir(mount_point + path.AsString())) { | 253 | if (FileUtil::CreateDir(mount_point + path.AsString())) { |
| @@ -281,6 +291,8 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SDMCArchive::OpenDirectory(const Pa | |||
| 281 | case PathParser::FileInPath: | 291 | case PathParser::FileInPath: |
| 282 | LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str()); | 292 | LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str()); |
| 283 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; | 293 | return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC; |
| 294 | case PathParser::DirectoryFound: | ||
| 295 | break; // Expected 'success' case | ||
| 284 | } | 296 | } |
| 285 | 297 | ||
| 286 | auto directory = std::make_unique<DiskDirectory>(full_path); | 298 | auto directory = std::make_unique<DiskDirectory>(full_path); |