summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2017-01-29 15:38:49 -0800
committerGravatar GitHub2017-01-29 15:38:49 -0800
commitf111cd66cec3e03ce9e7236a0325f1e0b2c59855 (patch)
tree8b31970e76f823de5249bb751789fbfcbac10686 /src
parentMerge pull request #2493 from Kloen/killing-warnings-final-mix (diff)
parentcitra: add missing control paths for ResultStatus on rom load. Fix warning ab... (diff)
downloadyuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.tar.gz
yuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.tar.xz
yuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.zip
Merge pull request #2492 from Kloen/killing-warnings-HD1.5ReMIX
Fix OSX build warnings about unhandled enumeration values.
Diffstat (limited to 'src')
-rw-r--r--src/citra/citra.cpp20
-rw-r--r--src/core/file_sys/archive_extsavedata.cpp2
-rw-r--r--src/core/file_sys/archive_sdmc.cpp12
-rw-r--r--src/core/file_sys/savedata_archive.cpp12
-rw-r--r--src/core/hle/service/err_f.cpp2
5 files changed, 48 insertions, 0 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp
index 99c096ac7..76f5caeb1 100644
--- a/src/citra/citra.cpp
+++ b/src/citra/citra.cpp
@@ -141,6 +141,26 @@ int main(int argc, char** argv) {
141 case Core::System::ResultStatus::ErrorLoader: 141 case Core::System::ResultStatus::ErrorLoader:
142 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 142 LOG_CRITICAL(Frontend, "Failed to load ROM!");
143 return -1; 143 return -1;
144 case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted:
145 LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before "
146 "being used with Citra. \n\n For more information on dumping and "
147 "decrypting games, please refer to: "
148 "https://citra-emu.org/wiki/Dumping-Game-Cartridges");
149 return -1;
150 case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat:
151 LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported.");
152 return -1;
153 case Core::System::ResultStatus::ErrorNotInitialized:
154 LOG_CRITICAL(Frontend, "CPUCore not initialized");
155 return -1;
156 case Core::System::ResultStatus::ErrorSystemMode:
157 LOG_CRITICAL(Frontend, "Failed to determine system mode!");
158 return -1;
159 case Core::System::ResultStatus::ErrorVideoCore:
160 LOG_CRITICAL(Frontend, "VideoCore not initialized");
161 return -1;
162 case Core::System::ResultStatus::Success:
163 break; // Expected case
144 } 164 }
145 165
146 while (emu_window->IsOpen()) { 166 while (emu_window->IsOpen()) {
diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp
index 51ce78435..dd2fb167f 100644
--- a/src/core/file_sys/archive_extsavedata.cpp
+++ b/src/core/file_sys/archive_extsavedata.cpp
@@ -107,6 +107,8 @@ public:
107 case PathParser::NotFound: 107 case PathParser::NotFound:
108 LOG_ERROR(Service_FS, "%s not found", full_path.c_str()); 108 LOG_ERROR(Service_FS, "%s not found", full_path.c_str());
109 return ERROR_FILE_NOT_FOUND; 109 return ERROR_FILE_NOT_FOUND;
110 case PathParser::FileFound:
111 break; // Expected 'success' case
110 } 112 }
111 113
112 FileUtil::IOFile file(full_path, "r+b"); 114 FileUtil::IOFile file(full_path, "r+b");
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);
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);
diff --git a/src/core/hle/service/err_f.cpp b/src/core/hle/service/err_f.cpp
index cd0a1a598..9da55f328 100644
--- a/src/core/hle/service/err_f.cpp
+++ b/src/core/hle/service/err_f.cpp
@@ -227,6 +227,8 @@ static void ThrowFatalError(Interface* self) {
227 LOG_CRITICAL(Service_ERR, "FINST2: 0x%08X", 227 LOG_CRITICAL(Service_ERR, "FINST2: 0x%08X",
228 errtype.exception_data.exception_info.fpinst2); 228 errtype.exception_data.exception_info.fpinst2);
229 break; 229 break;
230 case ExceptionType::Undefined:
231 break; // Not logging exception_info for this case
230 } 232 }
231 LOG_CRITICAL(Service_ERR, "Datetime: %s", GetCurrentSystemTime().c_str()); 233 LOG_CRITICAL(Service_ERR, "Datetime: %s", GetCurrentSystemTime().c_str());
232 break; 234 break;