diff options
| author | 2020-10-13 16:20:44 -0300 | |
|---|---|---|
| committer | 2020-10-13 16:20:44 -0300 | |
| commit | c5b3c8d06bcfa343b2cecbfc60b3530b306ebe88 (patch) | |
| tree | 9565ff464bbb9e5a0aa66e6e310098314e88d019 /src/core/file_sys | |
| parent | Merge pull request #3929 from FearlessTobi/ticket-keys (diff) | |
| parent | core/CMakeLists: Make some warnings errors (diff) | |
| download | yuzu-c5b3c8d06bcfa343b2cecbfc60b3530b306ebe88.tar.gz yuzu-c5b3c8d06bcfa343b2cecbfc60b3530b306ebe88.tar.xz yuzu-c5b3c8d06bcfa343b2cecbfc60b3530b306ebe88.zip | |
Merge pull request #4786 from lioncash/flags
core/CMakeLists: Make some warnings errors
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/fsmitm_romfsbuild.cpp | 10 | ||||
| -rw-r--r-- | src/core/file_sys/ips_layer.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/nca_metadata.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/patch_manager.cpp | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/src/core/file_sys/fsmitm_romfsbuild.cpp b/src/core/file_sys/fsmitm_romfsbuild.cpp index 2aff2708a..c52fafb6f 100644 --- a/src/core/file_sys/fsmitm_romfsbuild.cpp +++ b/src/core/file_sys/fsmitm_romfsbuild.cpp | |||
| @@ -266,8 +266,9 @@ std::multimap<u64, VirtualFile> RomFSBuildContext::Build() { | |||
| 266 | cur_file->offset = file_partition_size; | 266 | cur_file->offset = file_partition_size; |
| 267 | file_partition_size += cur_file->size; | 267 | file_partition_size += cur_file->size; |
| 268 | cur_file->entry_offset = entry_offset; | 268 | cur_file->entry_offset = entry_offset; |
| 269 | entry_offset += sizeof(RomFSFileEntry) + | 269 | entry_offset += |
| 270 | Common::AlignUp(cur_file->path_len - cur_file->cur_path_ofs, 4); | 270 | static_cast<u32>(sizeof(RomFSFileEntry) + |
| 271 | Common::AlignUp(cur_file->path_len - cur_file->cur_path_ofs, 4)); | ||
| 271 | prev_file = cur_file; | 272 | prev_file = cur_file; |
| 272 | } | 273 | } |
| 273 | // Assign deferred parent/sibling ownership. | 274 | // Assign deferred parent/sibling ownership. |
| @@ -284,8 +285,9 @@ std::multimap<u64, VirtualFile> RomFSBuildContext::Build() { | |||
| 284 | for (const auto& it : directories) { | 285 | for (const auto& it : directories) { |
| 285 | cur_dir = it.second; | 286 | cur_dir = it.second; |
| 286 | cur_dir->entry_offset = entry_offset; | 287 | cur_dir->entry_offset = entry_offset; |
| 287 | entry_offset += sizeof(RomFSDirectoryEntry) + | 288 | entry_offset += |
| 288 | Common::AlignUp(cur_dir->path_len - cur_dir->cur_path_ofs, 4); | 289 | static_cast<u32>(sizeof(RomFSDirectoryEntry) + |
| 290 | Common::AlignUp(cur_dir->path_len - cur_dir->cur_path_ofs, 4)); | ||
| 289 | } | 291 | } |
| 290 | // Assign deferred parent/sibling ownership. | 292 | // Assign deferred parent/sibling ownership. |
| 291 | for (auto it = directories.rbegin(); it->second != root; ++it) { | 293 | for (auto it = directories.rbegin(); it->second != root; ++it) { |
diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp index dd779310f..a6101f1c0 100644 --- a/src/core/file_sys/ips_layer.cpp +++ b/src/core/file_sys/ips_layer.cpp | |||
| @@ -299,7 +299,7 @@ void IPSwitchCompiler::Parse() { | |||
| 299 | patch_text->GetName(), offset, Common::HexToString(replace)); | 299 | patch_text->GetName(), offset, Common::HexToString(replace)); |
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | patch.records.insert_or_assign(offset, std::move(replace)); | 302 | patch.records.insert_or_assign(static_cast<u32>(offset), std::move(replace)); |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | patches.push_back(std::move(patch)); | 305 | patches.push_back(std::move(patch)); |
diff --git a/src/core/file_sys/nca_metadata.cpp b/src/core/file_sys/nca_metadata.cpp index 2d1476e3a..3596541b2 100644 --- a/src/core/file_sys/nca_metadata.cpp +++ b/src/core/file_sys/nca_metadata.cpp | |||
| @@ -108,7 +108,7 @@ std::vector<u8> CNMT::Serialize() const { | |||
| 108 | memcpy(out.data() + sizeof(CNMTHeader), &opt_header, sizeof(OptionalHeader)); | 108 | memcpy(out.data() + sizeof(CNMTHeader), &opt_header, sizeof(OptionalHeader)); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | auto offset = header.table_offset; | 111 | u64_le offset = header.table_offset; |
| 112 | 112 | ||
| 113 | for (const auto& rec : content_records) { | 113 | for (const auto& rec : content_records) { |
| 114 | memcpy(out.data() + offset + sizeof(CNMTHeader), &rec, sizeof(ContentRecord)); | 114 | memcpy(out.data() + offset + sizeof(CNMTHeader), &rec, sizeof(ContentRecord)); |
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index b9c09b456..807b05821 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | namespace FileSys { | 29 | namespace FileSys { |
| 30 | namespace { | 30 | namespace { |
| 31 | 31 | ||
| 32 | constexpr u64 SINGLE_BYTE_MODULUS = 0x100; | 32 | constexpr u32 SINGLE_BYTE_MODULUS = 0x100; |
| 33 | constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000; | 33 | constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000; |
| 34 | 34 | ||
| 35 | constexpr std::array<const char*, 14> EXEFS_FILE_NAMES{ | 35 | constexpr std::array<const char*, 14> EXEFS_FILE_NAMES{ |