summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-30 00:38:49 +0100
committerGitHub <noreply@github.com>2017-01-30 00:38:49 +0100
commitf111cd66cec3e03ce9e7236a0325f1e0b2c59855 (patch)
tree8b31970e76f823de5249bb751789fbfcbac10686 /src/core
parentMerge pull request #2493 from Kloen/killing-warnings-final-mix (diff)
parentcitra: add missing control paths for ResultStatus on rom load. Fix warning about unhandled enumeration values on OSX (diff)
downloadyuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.tar
yuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.tar.gz
yuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.tar.bz2
yuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.tar.lz
yuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.tar.xz
yuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.tar.zst
yuzu-f111cd66cec3e03ce9e7236a0325f1e0b2c59855.zip
Diffstat (limited to 'src/core')
-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
4 files changed, 28 insertions, 0 deletions
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:
case PathParser::NotFound:
LOG_ERROR(Service_FS, "%s not found", full_path.c_str());
return ERROR_FILE_NOT_FOUND;
+ case PathParser::FileFound:
+ break; // Expected 'success' case
}
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
FileUtil::CreateEmptyFile(full_path);
}
break;
+ case PathParser::FileFound:
+ break; // Expected 'success' case
}
FileUtil::IOFile file(full_path, mode.write_flag ? "r+b" : "rb");
@@ -106,6 +108,8 @@ ResultCode SDMCArchive::DeleteFile(const Path& path) const {
case PathParser::DirectoryFound:
LOG_ERROR(Service_FS, "%s is not a file", full_path.c_str());
return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC;
+ case PathParser::FileFound:
+ break; // Expected 'success' case
}
if (FileUtil::Delete(full_path)) {
@@ -154,6 +158,8 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou
case PathParser::FileFound:
LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str());
return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC;
+ case PathParser::DirectoryFound:
+ break; // Expected 'success' case
}
if (deleter(full_path)) {
@@ -197,6 +203,8 @@ ResultCode SDMCArchive::CreateFile(const FileSys::Path& path, u64 size) const {
case PathParser::FileFound:
LOG_ERROR(Service_FS, "%s already exists", full_path.c_str());
return ERROR_ALREADY_EXISTS;
+ case PathParser::NotFound:
+ break; // Expected 'success' case
}
if (size == 0) {
@@ -238,6 +246,8 @@ ResultCode SDMCArchive::CreateDirectory(const Path& path) const {
case PathParser::FileFound:
LOG_ERROR(Service_FS, "%s already exists", full_path.c_str());
return ERROR_ALREADY_EXISTS;
+ case PathParser::NotFound:
+ break; // Expected 'success' case
}
if (FileUtil::CreateDir(mount_point + path.AsString())) {
@@ -281,6 +291,8 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SDMCArchive::OpenDirectory(const Pa
case PathParser::FileInPath:
LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str());
return ERROR_UNEXPECTED_FILE_OR_DIRECTORY_SDMC;
+ case PathParser::DirectoryFound:
+ break; // Expected 'success' case
}
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
FileUtil::CreateEmptyFile(full_path);
}
break;
+ case PathParser::FileFound:
+ break; // Expected 'success' case
}
FileUtil::IOFile file(full_path, mode.write_flag ? "r+b" : "rb");
@@ -91,6 +93,8 @@ ResultCode SaveDataArchive::DeleteFile(const Path& path) const {
case PathParser::NotFound:
LOG_ERROR(Service_FS, "File not found %s", full_path.c_str());
return ERROR_FILE_NOT_FOUND;
+ case PathParser::FileFound:
+ break; // Expected 'success' case
}
if (FileUtil::Delete(full_path)) {
@@ -139,6 +143,8 @@ static ResultCode DeleteDirectoryHelper(const Path& path, const std::string& mou
case PathParser::FileFound:
LOG_ERROR(Service_FS, "Unexpected file or directory %s", full_path.c_str());
return ERROR_UNEXPECTED_FILE_OR_DIRECTORY;
+ case PathParser::DirectoryFound:
+ break; // Expected 'success' case
}
if (deleter(full_path)) {
@@ -182,6 +188,8 @@ ResultCode SaveDataArchive::CreateFile(const FileSys::Path& path, u64 size) cons
case PathParser::FileFound:
LOG_ERROR(Service_FS, "%s already exists", full_path.c_str());
return ERROR_FILE_ALREADY_EXISTS;
+ case PathParser::NotFound:
+ break; // Expected 'success' case
}
if (size == 0) {
@@ -225,6 +233,8 @@ ResultCode SaveDataArchive::CreateDirectory(const Path& path) const {
case PathParser::FileFound:
LOG_ERROR(Service_FS, "%s already exists", full_path.c_str());
return ERROR_DIRECTORY_ALREADY_EXISTS;
+ case PathParser::NotFound:
+ break; // Expected 'success' case
}
if (FileUtil::CreateDir(mount_point + path.AsString())) {
@@ -269,6 +279,8 @@ ResultVal<std::unique_ptr<DirectoryBackend>> SaveDataArchive::OpenDirectory(
case PathParser::FileFound:
LOG_ERROR(Service_FS, "Unexpected file in path %s", full_path.c_str());
return ERROR_UNEXPECTED_FILE_OR_DIRECTORY;
+ case PathParser::DirectoryFound:
+ break; // Expected 'success' case
}
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) {
LOG_CRITICAL(Service_ERR, "FINST2: 0x%08X",
errtype.exception_data.exception_info.fpinst2);
break;
+ case ExceptionType::Undefined:
+ break; // Not logging exception_info for this case
}
LOG_CRITICAL(Service_ERR, "Datetime: %s", GetCurrentSystemTime().c_str());
break;