summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2020-04-15 15:59:23 -0400
committerGravatar Lioncash2020-04-15 21:33:46 -0400
commit1c340c6efad903580904297730d708ce8b947eb6 (patch)
treea79ad11775373ecf31912a7a50fcfbcc08d6e8b3 /src
parentMerge pull request #3612 from ReinUsesLisp/red (diff)
downloadyuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.gz
yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.xz
yuzu-1c340c6efad903580904297730d708ce8b947eb6.zip
CMakeLists: Specify -Wextra on linux builds
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/core/arm/arm_interface.cpp4
-rw-r--r--src/core/file_sys/patch_manager.cpp3
-rw-r--r--src/core/file_sys/registered_cache.cpp23
-rw-r--r--src/core/file_sys/vfs_libzip.cpp4
-rw-r--r--src/core/frontend/framebuffer_layout.cpp2
-rw-r--r--src/core/hle/kernel/hle_ipc.cpp24
-rw-r--r--src/core/hle/service/audio/audren_u.cpp2
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp3
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp3
-rw-r--r--src/core/hle/service/time/time_zone_manager.cpp14
-rw-r--r--src/core/hle/service/vi/vi.cpp4
-rw-r--r--src/core/memory/dmnt_cheat_vm.cpp5
-rw-r--r--src/core/telemetry_session.cpp6
-rw-r--r--src/input_common/sdl/sdl_impl.cpp1
-rw-r--r--src/video_core/engines/shader_bytecode.h2
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp3
-rw-r--r--src/video_core/shader/decode/image.cpp11
-rw-r--r--src/video_core/shader/shader_ir.cpp7
-rw-r--r--src/video_core/shader/track.cpp7
-rw-r--r--src/video_core/texture_cache/surface_params.cpp1
-rw-r--r--src/video_core/texture_cache/texture_cache.h3
-rw-r--r--src/web_service/web_backend.cpp14
-rw-r--r--src/yuzu/debugger/profiler.cpp3
-rw-r--r--src/yuzu/game_list_worker.cpp3
-rw-r--r--src/yuzu/main.cpp8
26 files changed, 93 insertions, 70 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e40e9b0a5..0913be72c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -53,8 +53,11 @@ if (MSVC)
53else() 53else()
54 add_compile_options( 54 add_compile_options(
55 -Wall 55 -Wall
56 -Werror=implicit-fallthrough
56 -Werror=reorder 57 -Werror=reorder
58 -Wextra
57 -Wno-attributes 59 -Wno-attributes
60 -Wno-unused-parameter
58 ) 61 )
59 62
60 if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang) 63 if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp
index 7e846ddd5..fb9e616b9 100644
--- a/src/core/arm/arm_interface.cpp
+++ b/src/core/arm/arm_interface.cpp
@@ -123,7 +123,7 @@ Symbols GetSymbols(VAddr text_offset, Memory::Memory& memory) {
123std::optional<std::string> GetSymbolName(const Symbols& symbols, VAddr func_address) { 123std::optional<std::string> GetSymbolName(const Symbols& symbols, VAddr func_address) {
124 const auto iter = 124 const auto iter =
125 std::find_if(symbols.begin(), symbols.end(), [func_address](const auto& pair) { 125 std::find_if(symbols.begin(), symbols.end(), [func_address](const auto& pair) {
126 const auto& [symbol, name] = pair; 126 const auto& symbol = pair.first;
127 const auto end_address = symbol.value + symbol.size; 127 const auto end_address = symbol.value + symbol.size;
128 return func_address >= symbol.value && func_address < end_address; 128 return func_address >= symbol.value && func_address < end_address;
129 }); 129 });
@@ -146,7 +146,7 @@ std::vector<ARM_Interface::BacktraceEntry> ARM_Interface::GetBacktrace() const {
146 auto fp = GetReg(29); 146 auto fp = GetReg(29);
147 auto lr = GetReg(30); 147 auto lr = GetReg(30);
148 while (true) { 148 while (true) {
149 out.push_back({"", 0, lr, 0}); 149 out.push_back({"", 0, lr, 0, ""});
150 if (!fp) { 150 if (!fp) {
151 break; 151 break;
152 } 152 }
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp
index e77e82b8d..81ec06cd4 100644
--- a/src/core/file_sys/patch_manager.cpp
+++ b/src/core/file_sys/patch_manager.cpp
@@ -440,7 +440,8 @@ std::map<std::string, std::string, std::less<>> PatchManager::GetPatchVersionNam
440 // Game Updates 440 // Game Updates
441 const auto update_tid = GetUpdateTitleID(title_id); 441 const auto update_tid = GetUpdateTitleID(title_id);
442 PatchManager update{update_tid}; 442 PatchManager update{update_tid};
443 auto [nacp, discard_icon_file] = update.GetControlMetadata(); 443 const auto metadata = update.GetControlMetadata();
444 const auto& nacp = metadata.first;
444 445
445 const auto update_disabled = 446 const auto update_disabled =
446 std::find(disabled.cbegin(), disabled.cend(), "Update") != disabled.cend(); 447 std::find(disabled.cbegin(), disabled.cend(), "Update") != disabled.cend();
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp
index 6e9cf67ef..ba5f76288 100644
--- a/src/core/file_sys/registered_cache.cpp
+++ b/src/core/file_sys/registered_cache.cpp
@@ -591,14 +591,18 @@ InstallResult RegisteredCache::InstallEntry(const NSP& nsp, bool overwrite_if_ex
591InstallResult RegisteredCache::InstallEntry(const NCA& nca, TitleType type, 591InstallResult RegisteredCache::InstallEntry(const NCA& nca, TitleType type,
592 bool overwrite_if_exists, const VfsCopyFunction& copy) { 592 bool overwrite_if_exists, const VfsCopyFunction& copy) {
593 CNMTHeader header{ 593 CNMTHeader header{
594 nca.GetTitleId(), ///< Title ID 594 nca.GetTitleId(), // Title ID
595 0, ///< Ignore/Default title version 595 0, // Ignore/Default title version
596 type, ///< Type 596 type, // Type
597 {}, ///< Padding 597 {}, // Padding
598 0x10, ///< Default table offset 598 0x10, // Default table offset
599 1, ///< 1 Content Entry 599 1, // 1 Content Entry
600 0, ///< No Meta Entries 600 0, // No Meta Entries
601 {}, ///< Padding 601 {}, // Padding
602 {}, // Reserved 1
603 0, // Is committed
604 0, // Required download system version
605 {}, // Reserved 2
602 }; 606 };
603 OptionalHeader opt_header{0, 0}; 607 OptionalHeader opt_header{0, 0};
604 ContentRecord c_rec{{}, {}, {}, GetCRTypeFromNCAType(nca.GetType()), {}}; 608 ContentRecord c_rec{{}, {}, {}, GetCRTypeFromNCAType(nca.GetType()), {}};
@@ -848,7 +852,8 @@ VirtualFile ManualContentProvider::GetEntryUnparsed(u64 title_id, ContentRecordT
848VirtualFile ManualContentProvider::GetEntryRaw(u64 title_id, ContentRecordType type) const { 852VirtualFile ManualContentProvider::GetEntryRaw(u64 title_id, ContentRecordType type) const {
849 const auto iter = 853 const auto iter =
850 std::find_if(entries.begin(), entries.end(), [title_id, type](const auto& entry) { 854 std::find_if(entries.begin(), entries.end(), [title_id, type](const auto& entry) {
851 const auto [title_type, content_type, e_title_id] = entry.first; 855 const auto content_type = std::get<1>(entry.first);
856 const auto e_title_id = std::get<2>(entry.first);
852 return content_type == type && e_title_id == title_id; 857 return content_type == type && e_title_id == title_id;
853 }); 858 });
854 if (iter == entries.end()) 859 if (iter == entries.end())
diff --git a/src/core/file_sys/vfs_libzip.cpp b/src/core/file_sys/vfs_libzip.cpp
index 11d1978ea..d69952940 100644
--- a/src/core/file_sys/vfs_libzip.cpp
+++ b/src/core/file_sys/vfs_libzip.cpp
@@ -42,11 +42,11 @@ VirtualDir ExtractZIP(VirtualFile file) {
42 continue; 42 continue;
43 43
44 if (name.back() != '/') { 44 if (name.back() != '/') {
45 std::unique_ptr<zip_file_t, decltype(&zip_fclose)> file{ 45 std::unique_ptr<zip_file_t, decltype(&zip_fclose)> file2{
46 zip_fopen_index(zip.get(), i, 0), zip_fclose}; 46 zip_fopen_index(zip.get(), i, 0), zip_fclose};
47 47
48 std::vector<u8> buf(stat.size); 48 std::vector<u8> buf(stat.size);
49 if (zip_fread(file.get(), buf.data(), buf.size()) != buf.size()) 49 if (zip_fread(file2.get(), buf.data(), buf.size()) != s64(buf.size()))
50 return nullptr; 50 return nullptr;
51 51
52 const auto parts = FileUtil::SplitPathComponents(stat.name); 52 const auto parts = FileUtil::SplitPathComponents(stat.name);
diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp
index 68a0e0906..d0c43447c 100644
--- a/src/core/frontend/framebuffer_layout.cpp
+++ b/src/core/frontend/framebuffer_layout.cpp
@@ -25,7 +25,7 @@ FramebufferLayout DefaultFrameLayout(u32 width, u32 height) {
25 ASSERT(height > 0); 25 ASSERT(height > 0);
26 // The drawing code needs at least somewhat valid values for both screens 26 // The drawing code needs at least somewhat valid values for both screens
27 // so just calculate them both even if the other isn't showing. 27 // so just calculate them both even if the other isn't showing.
28 FramebufferLayout res{width, height}; 28 FramebufferLayout res{width, height, false, {}};
29 29
30 const float window_aspect_ratio = static_cast<float>(height) / width; 30 const float window_aspect_ratio = static_cast<float>(height) / width;
31 const float emulation_aspect_ratio = EmulationAspectRatio( 31 const float emulation_aspect_ratio = EmulationAspectRatio(
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp
index c558a2f33..d65dae3ae 100644
--- a/src/core/hle/kernel/hle_ipc.cpp
+++ b/src/core/hle/kernel/hle_ipc.cpp
@@ -284,17 +284,17 @@ ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(Thread& thread) {
284 284
285std::vector<u8> HLERequestContext::ReadBuffer(int buffer_index) const { 285std::vector<u8> HLERequestContext::ReadBuffer(int buffer_index) const {
286 std::vector<u8> buffer; 286 std::vector<u8> buffer;
287 const bool is_buffer_a{BufferDescriptorA().size() > buffer_index && 287 const bool is_buffer_a{BufferDescriptorA().size() > std::size_t(buffer_index) &&
288 BufferDescriptorA()[buffer_index].Size()}; 288 BufferDescriptorA()[buffer_index].Size()};
289 auto& memory = Core::System::GetInstance().Memory(); 289 auto& memory = Core::System::GetInstance().Memory();
290 290
291 if (is_buffer_a) { 291 if (is_buffer_a) {
292 ASSERT_MSG(BufferDescriptorA().size() > buffer_index, 292 ASSERT_MSG(BufferDescriptorA().size() > std::size_t(buffer_index),
293 "BufferDescriptorA invalid buffer_index {}", buffer_index); 293 "BufferDescriptorA invalid buffer_index {}", buffer_index);
294 buffer.resize(BufferDescriptorA()[buffer_index].Size()); 294 buffer.resize(BufferDescriptorA()[buffer_index].Size());
295 memory.ReadBlock(BufferDescriptorA()[buffer_index].Address(), buffer.data(), buffer.size()); 295 memory.ReadBlock(BufferDescriptorA()[buffer_index].Address(), buffer.data(), buffer.size());
296 } else { 296 } else {
297 ASSERT_MSG(BufferDescriptorX().size() > buffer_index, 297 ASSERT_MSG(BufferDescriptorX().size() > std::size_t(buffer_index),
298 "BufferDescriptorX invalid buffer_index {}", buffer_index); 298 "BufferDescriptorX invalid buffer_index {}", buffer_index);
299 buffer.resize(BufferDescriptorX()[buffer_index].Size()); 299 buffer.resize(BufferDescriptorX()[buffer_index].Size());
300 memory.ReadBlock(BufferDescriptorX()[buffer_index].Address(), buffer.data(), buffer.size()); 300 memory.ReadBlock(BufferDescriptorX()[buffer_index].Address(), buffer.data(), buffer.size());
@@ -310,7 +310,7 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size,
310 return 0; 310 return 0;
311 } 311 }
312 312
313 const bool is_buffer_b{BufferDescriptorB().size() > buffer_index && 313 const bool is_buffer_b{BufferDescriptorB().size() > std::size_t(buffer_index) &&
314 BufferDescriptorB()[buffer_index].Size()}; 314 BufferDescriptorB()[buffer_index].Size()};
315 const std::size_t buffer_size{GetWriteBufferSize(buffer_index)}; 315 const std::size_t buffer_size{GetWriteBufferSize(buffer_index)};
316 if (size > buffer_size) { 316 if (size > buffer_size) {
@@ -321,13 +321,13 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size,
321 321
322 auto& memory = Core::System::GetInstance().Memory(); 322 auto& memory = Core::System::GetInstance().Memory();
323 if (is_buffer_b) { 323 if (is_buffer_b) {
324 ASSERT_MSG(BufferDescriptorB().size() > buffer_index, 324 ASSERT_MSG(BufferDescriptorB().size() > std::size_t(buffer_index),
325 "BufferDescriptorB invalid buffer_index {}", buffer_index); 325 "BufferDescriptorB invalid buffer_index {}", buffer_index);
326 ASSERT_MSG(BufferDescriptorB()[buffer_index].Size() >= size, 326 ASSERT_MSG(BufferDescriptorB()[buffer_index].Size() >= size,
327 "BufferDescriptorB buffer_index {} is not large enough", buffer_index); 327 "BufferDescriptorB buffer_index {} is not large enough", buffer_index);
328 memory.WriteBlock(BufferDescriptorB()[buffer_index].Address(), buffer, size); 328 memory.WriteBlock(BufferDescriptorB()[buffer_index].Address(), buffer, size);
329 } else { 329 } else {
330 ASSERT_MSG(BufferDescriptorC().size() > buffer_index, 330 ASSERT_MSG(BufferDescriptorC().size() > std::size_t(buffer_index),
331 "BufferDescriptorC invalid buffer_index {}", buffer_index); 331 "BufferDescriptorC invalid buffer_index {}", buffer_index);
332 ASSERT_MSG(BufferDescriptorC()[buffer_index].Size() >= size, 332 ASSERT_MSG(BufferDescriptorC()[buffer_index].Size() >= size,
333 "BufferDescriptorC buffer_index {} is not large enough", buffer_index); 333 "BufferDescriptorC buffer_index {} is not large enough", buffer_index);
@@ -338,16 +338,16 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size,
338} 338}
339 339
340std::size_t HLERequestContext::GetReadBufferSize(int buffer_index) const { 340std::size_t HLERequestContext::GetReadBufferSize(int buffer_index) const {
341 const bool is_buffer_a{BufferDescriptorA().size() > buffer_index && 341 const bool is_buffer_a{BufferDescriptorA().size() > std::size_t(buffer_index) &&
342 BufferDescriptorA()[buffer_index].Size()}; 342 BufferDescriptorA()[buffer_index].Size()};
343 if (is_buffer_a) { 343 if (is_buffer_a) {
344 ASSERT_MSG(BufferDescriptorA().size() > buffer_index, 344 ASSERT_MSG(BufferDescriptorA().size() > std::size_t(buffer_index),
345 "BufferDescriptorA invalid buffer_index {}", buffer_index); 345 "BufferDescriptorA invalid buffer_index {}", buffer_index);
346 ASSERT_MSG(BufferDescriptorA()[buffer_index].Size() > 0, 346 ASSERT_MSG(BufferDescriptorA()[buffer_index].Size() > 0,
347 "BufferDescriptorA buffer_index {} is empty", buffer_index); 347 "BufferDescriptorA buffer_index {} is empty", buffer_index);
348 return BufferDescriptorA()[buffer_index].Size(); 348 return BufferDescriptorA()[buffer_index].Size();
349 } else { 349 } else {
350 ASSERT_MSG(BufferDescriptorX().size() > buffer_index, 350 ASSERT_MSG(BufferDescriptorX().size() > std::size_t(buffer_index),
351 "BufferDescriptorX invalid buffer_index {}", buffer_index); 351 "BufferDescriptorX invalid buffer_index {}", buffer_index);
352 ASSERT_MSG(BufferDescriptorX()[buffer_index].Size() > 0, 352 ASSERT_MSG(BufferDescriptorX()[buffer_index].Size() > 0,
353 "BufferDescriptorX buffer_index {} is empty", buffer_index); 353 "BufferDescriptorX buffer_index {} is empty", buffer_index);
@@ -356,14 +356,14 @@ std::size_t HLERequestContext::GetReadBufferSize(int buffer_index) const {
356} 356}
357 357
358std::size_t HLERequestContext::GetWriteBufferSize(int buffer_index) const { 358std::size_t HLERequestContext::GetWriteBufferSize(int buffer_index) const {
359 const bool is_buffer_b{BufferDescriptorB().size() > buffer_index && 359 const bool is_buffer_b{BufferDescriptorB().size() > std::size_t(buffer_index) &&
360 BufferDescriptorB()[buffer_index].Size()}; 360 BufferDescriptorB()[buffer_index].Size()};
361 if (is_buffer_b) { 361 if (is_buffer_b) {
362 ASSERT_MSG(BufferDescriptorB().size() > buffer_index, 362 ASSERT_MSG(BufferDescriptorB().size() > std::size_t(buffer_index),
363 "BufferDescriptorB invalid buffer_index {}", buffer_index); 363 "BufferDescriptorB invalid buffer_index {}", buffer_index);
364 return BufferDescriptorB()[buffer_index].Size(); 364 return BufferDescriptorB()[buffer_index].Size();
365 } else { 365 } else {
366 ASSERT_MSG(BufferDescriptorC().size() > buffer_index, 366 ASSERT_MSG(BufferDescriptorC().size() > std::size_t(buffer_index),
367 "BufferDescriptorC invalid buffer_index {}", buffer_index); 367 "BufferDescriptorC invalid buffer_index {}", buffer_index);
368 return BufferDescriptorC()[buffer_index].Size(); 368 return BufferDescriptorC()[buffer_index].Size();
369 } 369 }
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp
index 82a5dbf14..175cabf45 100644
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -129,7 +129,7 @@ private:
129 LOG_DEBUG(Service_Audio, "called. rendering_time_limit_percent={}", 129 LOG_DEBUG(Service_Audio, "called. rendering_time_limit_percent={}",
130 rendering_time_limit_percent); 130 rendering_time_limit_percent);
131 131
132 ASSERT(rendering_time_limit_percent >= 0 && rendering_time_limit_percent <= 100); 132 ASSERT(rendering_time_limit_percent <= 100);
133 133
134 IPC::ResponseBuilder rb{ctx, 2}; 134 IPC::ResponseBuilder rb{ctx, 2};
135 rb.Push(RESULT_SUCCESS); 135 rb.Push(RESULT_SUCCESS);
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 102017d73..cadc03805 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -451,7 +451,8 @@ FileSys::SaveDataSize FileSystemController::ReadSaveDataSize(FileSys::SaveDataTy
451 451
452 if (res != Loader::ResultStatus::Success) { 452 if (res != Loader::ResultStatus::Success) {
453 FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()}; 453 FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()};
454 auto [nacp_unique, discard] = pm.GetControlMetadata(); 454 const auto metadata = pm.GetControlMetadata();
455 const auto& nacp_unique = metadata.first;
455 456
456 if (nacp_unique != nullptr) { 457 if (nacp_unique != nullptr) {
457 new_size = {nacp_unique->GetDefaultNormalSaveSize(), 458 new_size = {nacp_unique->GetDefaultNormalSaveSize(),
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index e6811d5b5..61045c75c 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -575,6 +575,7 @@ private:
575 0, 575 0,
576 user_id->GetSize(), 576 user_id->GetSize(),
577 {}, 577 {},
578 {},
578 }); 579 });
579 580
580 continue; 581 continue;
@@ -595,6 +596,7 @@ private:
595 stoull_be(title_id->GetName()), 596 stoull_be(title_id->GetName()),
596 title_id->GetSize(), 597 title_id->GetSize(),
597 {}, 598 {},
599 {},
598 }); 600 });
599 } 601 }
600 } 602 }
@@ -619,6 +621,7 @@ private:
619 stoull_be(title_id->GetName()), 621 stoull_be(title_id->GetName()),
620 title_id->GetSize(), 622 title_id->GetSize(),
621 {}, 623 {},
624 {},
622 }); 625 });
623 } 626 }
624 } 627 }
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp
index 07b553a43..c8159bcd5 100644
--- a/src/core/hle/service/time/time_zone_manager.cpp
+++ b/src/core/hle/service/time/time_zone_manager.cpp
@@ -309,7 +309,7 @@ static bool ParsePosixName(const char* name, TimeZoneRule& rule) {
309 offset = GetTZName(name, offset); 309 offset = GetTZName(name, offset);
310 std_len = offset; 310 std_len = offset;
311 } 311 }
312 if (!std_len) { 312 if (std_len == 0) {
313 return {}; 313 return {};
314 } 314 }
315 if (!GetOffset(name, offset, std_offset)) { 315 if (!GetOffset(name, offset, std_offset)) {
@@ -320,7 +320,7 @@ static bool ParsePosixName(const char* name, TimeZoneRule& rule) {
320 int dest_len{}; 320 int dest_len{};
321 int dest_offset{}; 321 int dest_offset{};
322 const char* dest_name{name + offset}; 322 const char* dest_name{name + offset};
323 if (rule.chars.size() < char_count) { 323 if (rule.chars.size() < std::size_t(char_count)) {
324 return {}; 324 return {};
325 } 325 }
326 326
@@ -343,7 +343,7 @@ static bool ParsePosixName(const char* name, TimeZoneRule& rule) {
343 return {}; 343 return {};
344 } 344 }
345 char_count += dest_len + 1; 345 char_count += dest_len + 1;
346 if (rule.chars.size() < char_count) { 346 if (rule.chars.size() < std::size_t(char_count)) {
347 return {}; 347 return {};
348 } 348 }
349 if (name[offset] != '\0' && name[offset] != ',' && name[offset] != ';') { 349 if (name[offset] != '\0' && name[offset] != ',' && name[offset] != ';') {
@@ -414,7 +414,7 @@ static bool ParsePosixName(const char* name, TimeZoneRule& rule) {
414 if (is_reversed || 414 if (is_reversed ||
415 (start_time < end_time && 415 (start_time < end_time &&
416 (end_time - start_time < (year_seconds + (std_offset - dest_offset))))) { 416 (end_time - start_time < (year_seconds + (std_offset - dest_offset))))) {
417 if (rule.ats.size() - 2 < time_count) { 417 if (rule.ats.size() - 2 < std::size_t(time_count)) {
418 break; 418 break;
419 } 419 }
420 420
@@ -609,7 +609,7 @@ static bool ParseTimeZoneBinary(TimeZoneRule& time_zone_rule, FileSys::VirtualFi
609 } 609 }
610 610
611 const u64 position{(read_offset - sizeof(TzifHeader))}; 611 const u64 position{(read_offset - sizeof(TzifHeader))};
612 const std::size_t bytes_read{vfs_file->GetSize() - sizeof(TzifHeader) - position}; 612 const s64 bytes_read = s64(vfs_file->GetSize() - sizeof(TzifHeader) - position);
613 if (bytes_read < 0) { 613 if (bytes_read < 0) {
614 return {}; 614 return {};
615 } 615 }
@@ -621,11 +621,11 @@ static bool ParseTimeZoneBinary(TimeZoneRule& time_zone_rule, FileSys::VirtualFi
621 std::array<char, time_zone_name_max + 1> temp_name{}; 621 std::array<char, time_zone_name_max + 1> temp_name{};
622 vfs_file->ReadArray(temp_name.data(), bytes_read, read_offset); 622 vfs_file->ReadArray(temp_name.data(), bytes_read, read_offset);
623 if (bytes_read > 2 && temp_name[0] == '\n' && temp_name[bytes_read - 1] == '\n' && 623 if (bytes_read > 2 && temp_name[0] == '\n' && temp_name[bytes_read - 1] == '\n' &&
624 time_zone_rule.type_count + 2 <= time_zone_rule.ttis.size()) { 624 std::size_t(time_zone_rule.type_count) + 2 <= time_zone_rule.ttis.size()) {
625 temp_name[bytes_read - 1] = '\0'; 625 temp_name[bytes_read - 1] = '\0';
626 626
627 std::array<char, time_zone_name_max> name{}; 627 std::array<char, time_zone_name_max> name{};
628 std::memcpy(name.data(), temp_name.data() + 1, bytes_read - 1); 628 std::memcpy(name.data(), temp_name.data() + 1, std::size_t(bytes_read - 1));
629 629
630 TimeZoneRule temp_rule; 630 TimeZoneRule temp_rule;
631 if (ParsePosixName(name.data(), temp_rule)) { 631 if (ParsePosixName(name.data(), temp_rule)) {
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index fdc62d05b..7f109f4eb 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -101,8 +101,8 @@ public:
101 } 101 }
102 102
103 std::u16string ReadInterfaceToken() { 103 std::u16string ReadInterfaceToken() {
104 u32 unknown = Read<u32_le>(); 104 [[maybe_unused]] const u32 unknown = Read<u32_le>();
105 u32 length = Read<u32_le>(); 105 const u32 length = Read<u32_le>();
106 106
107 std::u16string token{}; 107 std::u16string token{};
108 108
diff --git a/src/core/memory/dmnt_cheat_vm.cpp b/src/core/memory/dmnt_cheat_vm.cpp
index 4f4fa5099..5bb26a36f 100644
--- a/src/core/memory/dmnt_cheat_vm.cpp
+++ b/src/core/memory/dmnt_cheat_vm.cpp
@@ -55,7 +55,7 @@ void DmntCheatVm::LogOpcode(const CheatVmOpcode& opcode) {
55 fmt::format("Cond Type: {:X}", static_cast<u32>(begin_cond->cond_type))); 55 fmt::format("Cond Type: {:X}", static_cast<u32>(begin_cond->cond_type)));
56 callbacks->CommandLog(fmt::format("Rel Addr: {:X}", begin_cond->rel_address)); 56 callbacks->CommandLog(fmt::format("Rel Addr: {:X}", begin_cond->rel_address));
57 callbacks->CommandLog(fmt::format("Value: {:X}", begin_cond->value.bit64)); 57 callbacks->CommandLog(fmt::format("Value: {:X}", begin_cond->value.bit64));
58 } else if (auto end_cond = std::get_if<EndConditionalOpcode>(&opcode.opcode)) { 58 } else if (std::holds_alternative<EndConditionalOpcode>(opcode.opcode)) {
59 callbacks->CommandLog("Opcode: End Conditional"); 59 callbacks->CommandLog("Opcode: End Conditional");
60 } else if (auto ctrl_loop = std::get_if<ControlLoopOpcode>(&opcode.opcode)) { 60 } else if (auto ctrl_loop = std::get_if<ControlLoopOpcode>(&opcode.opcode)) {
61 if (ctrl_loop->start_loop) { 61 if (ctrl_loop->start_loop) {
@@ -399,6 +399,7 @@ bool DmntCheatVm::DecodeNextOpcode(CheatVmOpcode& out) {
399 // 8kkkkkkk 399 // 8kkkkkkk
400 // Just parse the mask. 400 // Just parse the mask.
401 begin_keypress_cond.key_mask = first_dword & 0x0FFFFFFF; 401 begin_keypress_cond.key_mask = first_dword & 0x0FFFFFFF;
402 opcode.opcode = begin_keypress_cond;
402 } break; 403 } break;
403 case CheatVmOpcodeType::PerformArithmeticRegister: { 404 case CheatVmOpcodeType::PerformArithmeticRegister: {
404 PerformArithmeticRegisterOpcode perform_math_reg{}; 405 PerformArithmeticRegisterOpcode perform_math_reg{};
@@ -779,7 +780,7 @@ void DmntCheatVm::Execute(const CheatProcessMetadata& metadata) {
779 if (!cond_met) { 780 if (!cond_met) {
780 SkipConditionalBlock(); 781 SkipConditionalBlock();
781 } 782 }
782 } else if (auto end_cond = std::get_if<EndConditionalOpcode>(&cur_opcode.opcode)) { 783 } else if (std::holds_alternative<EndConditionalOpcode>(cur_opcode.opcode)) {
783 // Decrement the condition depth. 784 // Decrement the condition depth.
784 // We will assume, graciously, that mismatched conditional block ends are a nop. 785 // We will assume, graciously, that mismatched conditional block ends are a nop.
785 if (condition_depth > 0) { 786 if (condition_depth > 0) {
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp
index 0f3685d1c..fd5a3ee9f 100644
--- a/src/core/telemetry_session.cpp
+++ b/src/core/telemetry_session.cpp
@@ -153,9 +153,9 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) {
153 app_loader.ReadTitle(name); 153 app_loader.ReadTitle(name);
154 154
155 if (name.empty()) { 155 if (name.empty()) {
156 auto [nacp, icon_file] = FileSys::PatchManager(program_id).GetControlMetadata(); 156 const auto metadata = FileSys::PatchManager(program_id).GetControlMetadata();
157 if (nacp != nullptr) { 157 if (metadata.first != nullptr) {
158 name = nacp->GetApplicationName(); 158 name = metadata.first->GetApplicationName();
159 } 159 }
160 } 160 }
161 161
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index a2e0c0bd2..675b477fa 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -603,6 +603,7 @@ public:
603 if (std::abs(event.jaxis.value / 32767.0) < 0.5) { 603 if (std::abs(event.jaxis.value / 32767.0) < 0.5) {
604 break; 604 break;
605 } 605 }
606 [[fallthrough]];
606 case SDL_JOYBUTTONUP: 607 case SDL_JOYBUTTONUP:
607 case SDL_JOYHATMOTION: 608 case SDL_JOYHATMOTION:
608 return SDLEventToButtonParamPackage(state, event); 609 return SDLEventToButtonParamPackage(state, event);
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index 5e9cfba22..7231597d4 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -1507,7 +1507,7 @@ union Instruction {
1507 1507
1508 TextureType GetTextureType() const { 1508 TextureType GetTextureType() const {
1509 // The TLDS instruction has a weird encoding for the texture type. 1509 // The TLDS instruction has a weird encoding for the texture type.
1510 if (texture_info >= 0 && texture_info <= 1) { 1510 if (texture_info <= 1) {
1511 return TextureType::Texture1D; 1511 return TextureType::Texture1D;
1512 } 1512 }
1513 if (texture_info == 2 || texture_info == 8 || texture_info == 12 || 1513 if (texture_info == 2 || texture_info == 8 || texture_info == 12 ||
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index b1804e9ea..9495f48a2 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -835,7 +835,8 @@ private:
835 835
836 void DeclareConstantBuffers() { 836 void DeclareConstantBuffers() {
837 u32 binding = device.GetBaseBindings(stage).uniform_buffer; 837 u32 binding = device.GetBaseBindings(stage).uniform_buffer;
838 for (const auto& [index, cbuf] : ir.GetConstantBuffers()) { 838 for (const auto& buffers : ir.GetConstantBuffers()) {
839 const auto index = buffers.first;
839 code.AddLine("layout (std140, binding = {}) uniform {} {{", binding++, 840 code.AddLine("layout (std140, binding = {}) uniform {} {{", binding++,
840 GetConstBufferBlock(index)); 841 GetConstBufferBlock(index));
841 code.AddLine(" uvec4 {}[{}];", GetConstBuffer(index), MAX_CONSTBUFFER_ELEMENTS); 842 code.AddLine(" uvec4 {}[{}];", GetConstBuffer(index), MAX_CONSTBUFFER_ELEMENTS);
diff --git a/src/video_core/shader/decode/image.cpp b/src/video_core/shader/decode/image.cpp
index 0dd7a1196..85ee9aa5e 100644
--- a/src/video_core/shader/decode/image.cpp
+++ b/src/video_core/shader/decode/image.cpp
@@ -352,8 +352,10 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
352 registry.ObtainBoundSampler(static_cast<u32>(instr.image.index.Value())); 352 registry.ObtainBoundSampler(static_cast<u32>(instr.image.index.Value()));
353 } else { 353 } else {
354 const Node image_register = GetRegister(instr.gpr39); 354 const Node image_register = GetRegister(instr.gpr39);
355 const auto [base_image, buffer, offset] = TrackCbuf( 355 const auto result = TrackCbuf(image_register, global_code,
356 image_register, global_code, static_cast<s64>(global_code.size())); 356 static_cast<s64>(global_code.size()));
357 const auto buffer = std::get<1>(result);
358 const auto offset = std::get<2>(result);
357 descriptor = registry.ObtainBindlessSampler(buffer, offset); 359 descriptor = registry.ObtainBindlessSampler(buffer, offset);
358 } 360 }
359 if (!descriptor) { 361 if (!descriptor) {
@@ -497,9 +499,12 @@ Image& ShaderIR::GetImage(Tegra::Shader::Image image, Tegra::Shader::ImageType t
497 499
498Image& ShaderIR::GetBindlessImage(Tegra::Shader::Register reg, Tegra::Shader::ImageType type) { 500Image& ShaderIR::GetBindlessImage(Tegra::Shader::Register reg, Tegra::Shader::ImageType type) {
499 const Node image_register = GetRegister(reg); 501 const Node image_register = GetRegister(reg);
500 const auto [base_image, buffer, offset] = 502 const auto result =
501 TrackCbuf(image_register, global_code, static_cast<s64>(global_code.size())); 503 TrackCbuf(image_register, global_code, static_cast<s64>(global_code.size()));
502 504
505 const auto buffer = std::get<1>(result);
506 const auto offset = std::get<2>(result);
507
503 const auto it = 508 const auto it =
504 std::find_if(std::begin(used_images), std::end(used_images), 509 std::find_if(std::begin(used_images), std::end(used_images),
505 [buffer = buffer, offset = offset](const Image& entry) { 510 [buffer = buffer, offset = offset](const Image& entry) {
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp
index 8852c8a1b..822674926 100644
--- a/src/video_core/shader/shader_ir.cpp
+++ b/src/video_core/shader/shader_ir.cpp
@@ -56,8 +56,7 @@ Node ShaderIR::GetConstBuffer(u64 index_, u64 offset_) {
56 const auto index = static_cast<u32>(index_); 56 const auto index = static_cast<u32>(index_);
57 const auto offset = static_cast<u32>(offset_); 57 const auto offset = static_cast<u32>(offset_);
58 58
59 const auto [entry, is_new] = used_cbufs.try_emplace(index); 59 used_cbufs.try_emplace(index).first->second.MarkAsUsed(offset);
60 entry->second.MarkAsUsed(offset);
61 60
62 return MakeNode<CbufNode>(index, Immediate(offset)); 61 return MakeNode<CbufNode>(index, Immediate(offset));
63} 62}
@@ -66,8 +65,7 @@ Node ShaderIR::GetConstBufferIndirect(u64 index_, u64 offset_, Node node) {
66 const auto index = static_cast<u32>(index_); 65 const auto index = static_cast<u32>(index_);
67 const auto offset = static_cast<u32>(offset_); 66 const auto offset = static_cast<u32>(offset_);
68 67
69 const auto [entry, is_new] = used_cbufs.try_emplace(index); 68 used_cbufs.try_emplace(index).first->second.MarkAsUsedIndirect();
70 entry->second.MarkAsUsedIndirect();
71 69
72 Node final_offset = [&] { 70 Node final_offset = [&] {
73 // Attempt to inline constant buffer without a variable offset. This is done to allow 71 // Attempt to inline constant buffer without a variable offset. This is done to allow
@@ -166,6 +164,7 @@ Node ShaderIR::ConvertIntegerSize(Node value, Register::Size size, bool is_signe
166 std::move(value), Immediate(16)); 164 std::move(value), Immediate(16));
167 value = SignedOperation(OperationCode::IArithmeticShiftRight, is_signed, NO_PRECISE, 165 value = SignedOperation(OperationCode::IArithmeticShiftRight, is_signed, NO_PRECISE,
168 std::move(value), Immediate(16)); 166 std::move(value), Immediate(16));
167 return value;
169 case Register::Size::Word: 168 case Register::Size::Word:
170 // Default - do nothing 169 // Default - do nothing
171 return value; 170 return value;
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp
index 10739b37d..224943ad9 100644
--- a/src/video_core/shader/track.cpp
+++ b/src/video_core/shader/track.cpp
@@ -27,8 +27,9 @@ std::pair<Node, s64> FindOperation(const NodeBlock& code, s64 cursor,
27 27
28 if (const auto conditional = std::get_if<ConditionalNode>(&*node)) { 28 if (const auto conditional = std::get_if<ConditionalNode>(&*node)) {
29 const auto& conditional_code = conditional->GetCode(); 29 const auto& conditional_code = conditional->GetCode();
30 auto [found, internal_cursor] = FindOperation( 30 auto result = FindOperation(
31 conditional_code, static_cast<s64>(conditional_code.size() - 1), operation_code); 31 conditional_code, static_cast<s64>(conditional_code.size() - 1), operation_code);
32 auto& found = result.first;
32 if (found) { 33 if (found) {
33 return {std::move(found), cursor}; 34 return {std::move(found), cursor};
34 } 35 }
@@ -186,8 +187,8 @@ std::tuple<Node, u32, u32> ShaderIR::TrackCbuf(Node tracked, const NodeBlock& co
186std::optional<u32> ShaderIR::TrackImmediate(Node tracked, const NodeBlock& code, s64 cursor) const { 187std::optional<u32> ShaderIR::TrackImmediate(Node tracked, const NodeBlock& code, s64 cursor) const {
187 // Reduce the cursor in one to avoid infinite loops when the instruction sets the same register 188 // Reduce the cursor in one to avoid infinite loops when the instruction sets the same register
188 // that it uses as operand 189 // that it uses as operand
189 const auto [found, found_cursor] = 190 const auto result = TrackRegister(&std::get<GprNode>(*tracked), code, cursor - 1);
190 TrackRegister(&std::get<GprNode>(*tracked), code, cursor - 1); 191 const auto& found = result.first;
191 if (!found) { 192 if (!found) {
192 return {}; 193 return {};
193 } 194 }
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index 6f3ef45be..0de499946 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -167,7 +167,6 @@ SurfaceParams SurfaceParams::CreateForImage(const FormatLookupTable& lookup_tabl
167 167
168SurfaceParams SurfaceParams::CreateForDepthBuffer(Core::System& system) { 168SurfaceParams SurfaceParams::CreateForDepthBuffer(Core::System& system) {
169 const auto& regs = system.GPU().Maxwell3D().regs; 169 const auto& regs = system.GPU().Maxwell3D().regs;
170 regs.zeta_width, regs.zeta_height, regs.zeta.format, regs.zeta.memory_layout.type;
171 SurfaceParams params; 170 SurfaceParams params;
172 params.is_tiled = regs.zeta.memory_layout.type == 171 params.is_tiled = regs.zeta.memory_layout.type ==
173 Tegra::Engines::Maxwell3D::Regs::InvMemoryLayout::BlockLinear; 172 Tegra::Engines::Maxwell3D::Regs::InvMemoryLayout::BlockLinear;
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 4edd4313b..47881d527 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -647,7 +647,8 @@ private:
647 break; 647 break;
648 } 648 }
649 const u32 offset = static_cast<u32>(surface->GetCpuAddr() - cpu_addr); 649 const u32 offset = static_cast<u32>(surface->GetCpuAddr() - cpu_addr);
650 const auto [x, y, z] = params.GetBlockOffsetXYZ(offset); 650 const auto offsets = params.GetBlockOffsetXYZ(offset);
651 const auto z = std::get<2>(offsets);
651 modified |= surface->IsModified(); 652 modified |= surface->IsModified();
652 const CopyParams copy_params(0, 0, 0, 0, 0, z, 0, 0, params.width, params.height, 653 const CopyParams copy_params(0, 0, 0, 0, 0, z, 0, 0, params.width, params.height,
653 1); 654 1);
diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp
index 737ffe409..09d1651ac 100644
--- a/src/web_service/web_backend.cpp
+++ b/src/web_service/web_backend.cpp
@@ -43,7 +43,7 @@ struct Client::Impl {
43 if (jwt.empty() && !allow_anonymous) { 43 if (jwt.empty() && !allow_anonymous) {
44 LOG_ERROR(WebService, "Credentials must be provided for authenticated requests"); 44 LOG_ERROR(WebService, "Credentials must be provided for authenticated requests");
45 return Common::WebResult{Common::WebResult::Code::CredentialsMissing, 45 return Common::WebResult{Common::WebResult::Code::CredentialsMissing,
46 "Credentials needed"}; 46 "Credentials needed", ""};
47 } 47 }
48 48
49 auto result = GenericRequest(method, path, data, accept, jwt); 49 auto result = GenericRequest(method, path, data, accept, jwt);
@@ -81,12 +81,12 @@ struct Client::Impl {
81 cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port); 81 cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port);
82 } else { 82 } else {
83 LOG_ERROR(WebService, "Bad URL scheme {}", parsedUrl.m_Scheme); 83 LOG_ERROR(WebService, "Bad URL scheme {}", parsedUrl.m_Scheme);
84 return Common::WebResult{Common::WebResult::Code::InvalidURL, "Bad URL scheme"}; 84 return Common::WebResult{Common::WebResult::Code::InvalidURL, "Bad URL scheme", ""};
85 } 85 }
86 } 86 }
87 if (cli == nullptr) { 87 if (cli == nullptr) {
88 LOG_ERROR(WebService, "Invalid URL {}", host + path); 88 LOG_ERROR(WebService, "Invalid URL {}", host + path);
89 return Common::WebResult{Common::WebResult::Code::InvalidURL, "Invalid URL"}; 89 return Common::WebResult{Common::WebResult::Code::InvalidURL, "Invalid URL", ""};
90 } 90 }
91 cli->set_timeout_sec(TIMEOUT_SECONDS); 91 cli->set_timeout_sec(TIMEOUT_SECONDS);
92 92
@@ -118,27 +118,27 @@ struct Client::Impl {
118 118
119 if (!cli->send(request, response)) { 119 if (!cli->send(request, response)) {
120 LOG_ERROR(WebService, "{} to {} returned null", method, host + path); 120 LOG_ERROR(WebService, "{} to {} returned null", method, host + path);
121 return Common::WebResult{Common::WebResult::Code::LibError, "Null response"}; 121 return Common::WebResult{Common::WebResult::Code::LibError, "Null response", ""};
122 } 122 }
123 123
124 if (response.status >= 400) { 124 if (response.status >= 400) {
125 LOG_ERROR(WebService, "{} to {} returned error status code: {}", method, host + path, 125 LOG_ERROR(WebService, "{} to {} returned error status code: {}", method, host + path,
126 response.status); 126 response.status);
127 return Common::WebResult{Common::WebResult::Code::HttpError, 127 return Common::WebResult{Common::WebResult::Code::HttpError,
128 std::to_string(response.status)}; 128 std::to_string(response.status), ""};
129 } 129 }
130 130
131 auto content_type = response.headers.find("content-type"); 131 auto content_type = response.headers.find("content-type");
132 132
133 if (content_type == response.headers.end()) { 133 if (content_type == response.headers.end()) {
134 LOG_ERROR(WebService, "{} to {} returned no content", method, host + path); 134 LOG_ERROR(WebService, "{} to {} returned no content", method, host + path);
135 return Common::WebResult{Common::WebResult::Code::WrongContent, ""}; 135 return Common::WebResult{Common::WebResult::Code::WrongContent, "", ""};
136 } 136 }
137 137
138 if (content_type->second.find(accept) == std::string::npos) { 138 if (content_type->second.find(accept) == std::string::npos) {
139 LOG_ERROR(WebService, "{} to {} returned wrong content: {}", method, host + path, 139 LOG_ERROR(WebService, "{} to {} returned wrong content: {}", method, host + path,
140 content_type->second); 140 content_type->second);
141 return Common::WebResult{Common::WebResult::Code::WrongContent, "Wrong content"}; 141 return Common::WebResult{Common::WebResult::Code::WrongContent, "Wrong content", ""};
142 } 142 }
143 return Common::WebResult{Common::WebResult::Code::Success, "", response.body}; 143 return Common::WebResult{Common::WebResult::Code::Success, "", response.body};
144 } 144 }
diff --git a/src/yuzu/debugger/profiler.cpp b/src/yuzu/debugger/profiler.cpp
index f594ef076..53049ffd6 100644
--- a/src/yuzu/debugger/profiler.cpp
+++ b/src/yuzu/debugger/profiler.cpp
@@ -51,7 +51,8 @@ MicroProfileDialog::MicroProfileDialog(QWidget* parent) : QWidget(parent, Qt::Di
51 setWindowTitle(tr("MicroProfile")); 51 setWindowTitle(tr("MicroProfile"));
52 resize(1000, 600); 52 resize(1000, 600);
53 // Remove the "?" button from the titlebar and enable the maximize button 53 // Remove the "?" button from the titlebar and enable the maximize button
54 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::WindowMaximizeButtonHint); 54 setWindowFlags((windowFlags() & ~Qt::WindowContextHelpButtonHint) |
55 Qt::WindowMaximizeButtonHint);
55 56
56#if MICROPROFILE_ENABLED 57#if MICROPROFILE_ENABLED
57 58
diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp
index da2c27aa2..2018150db 100644
--- a/src/yuzu/game_list_worker.cpp
+++ b/src/yuzu/game_list_worker.cpp
@@ -91,7 +91,8 @@ std::pair<std::vector<u8>, std::string> GetGameListCachedObject(
91 return generator(); 91 return generator();
92 } 92 }
93 93
94 if (file1.write(reinterpret_cast<const char*>(icon.data()), icon.size()) != icon.size()) { 94 if (file1.write(reinterpret_cast<const char*>(icon.data()), icon.size()) !=
95 s64(icon.size())) {
95 LOG_ERROR(Frontend, "Failed to write data to cache file."); 96 LOG_ERROR(Frontend, "Failed to write data to cache file.");
96 return generator(); 97 return generator();
97 } 98 }
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 1717e06f9..2c8eb481d 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1019,9 +1019,9 @@ void GMainWindow::BootGame(const QString& filename) {
1019 std::string title_name; 1019 std::string title_name;
1020 const auto res = Core::System::GetInstance().GetGameName(title_name); 1020 const auto res = Core::System::GetInstance().GetGameName(title_name);
1021 if (res != Loader::ResultStatus::Success) { 1021 if (res != Loader::ResultStatus::Success) {
1022 const auto [nacp, icon_file] = FileSys::PatchManager(title_id).GetControlMetadata(); 1022 const auto metadata = FileSys::PatchManager(title_id).GetControlMetadata();
1023 if (nacp != nullptr) 1023 if (metadata.first != nullptr)
1024 title_name = nacp->GetApplicationName(); 1024 title_name = metadata.first->GetApplicationName();
1025 1025
1026 if (title_name.empty()) 1026 if (title_name.empty())
1027 title_name = FileUtil::GetFilename(filename.toStdString()); 1027 title_name = FileUtil::GetFilename(filename.toStdString());
@@ -1628,7 +1628,7 @@ void GMainWindow::OnMenuInstallToNAND() {
1628 } 1628 }
1629 1629
1630 FileSys::InstallResult res; 1630 FileSys::InstallResult res;
1631 if (index >= static_cast<size_t>(FileSys::TitleType::Application)) { 1631 if (index >= static_cast<s32>(FileSys::TitleType::Application)) {
1632 res = Core::System::GetInstance() 1632 res = Core::System::GetInstance()
1633 .GetFileSystemController() 1633 .GetFileSystemController()
1634 .GetUserNANDContents() 1634 .GetUserNANDContents()