Repository navigation
Fix some warnings - #17703
Merged
Merged
Fix some warnings#17703
Conversation
Megamouse
commented
Nov 16, 2025
Contributor
- Fixes some compiler warnings
- Forward declare gui_settings
kd-11
reviewed
Nov 16, 2025
| { | ||
| .sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, | ||
| .stage = { | ||
| .stage = VkPipelineShaderStageCreateInfo{ |
Contributor
Author
There was a problem hiding this comment.
Why not? What speaks against it?
Contributor
There was a problem hiding this comment.
Me and my hatred for extra keystrokes. It's not like stage can be anything else other than VkPipelineShaderStageCreateInfo.
kd-11
reviewed
Nov 16, 2025
| { | ||
| auto renderer = get_font(); | ||
| const auto [caret_x, caret_y] = renderer->get_char_offset(text.c_str(), caret_position, clip_text ? w : -1, wrap_text); | ||
| const auto& [caret_x, caret_y] = renderer->get_char_offset(text.c_str(), caret_position, clip_text ? w : -1, wrap_text); |
Contributor
There was a problem hiding this comment.
No, the get_char_offset returns a temp var. Why would you take a reference to that?
Contributor
Author
There was a problem hiding this comment.
It's a performance warning on gcc arm if I saw correctly.
Contributor
There was a problem hiding this comment.
It is weird, but shouldn't crash either way. I'm not sure why arm would refuse to ellide the copy on return there but the compiler people must have had their reasons I guess.
Contributor
|
While you are fixing warnings, can you also fix these 2? diff --git a/rpcs3/Emu/CPU/CPUTranslator.h b/rpcs3/Emu/CPU/CPUTranslator.h
index 8d1a5d42a..a2f6a58e1 100644
--- a/rpcs3/Emu/CPU/CPUTranslator.h
+++ b/rpcs3/Emu/CPU/CPUTranslator.h
@@ -4007,7 +4007,7 @@ llvm::CallInst* llvm_asm(
const std::string& constraints,
llvm::LLVMContext& context)
{
- llvm::ArrayRef<llvm::Type*> types_ref = std::nullopt;
+ llvm::ArrayRef<llvm::Type*> types_ref{};
std::vector<llvm::Type*> types;
types.reserve(args.size());and this one diff --git a/rpcs3/util/sysinfo.cpp b/rpcs3/util/sysinfo.cpp
index 52bb6f27b..28c68c867 100755
--- a/rpcs3/util/sysinfo.cpp
+++ b/rpcs3/util/sysinfo.cpp
@@ -74,6 +74,7 @@ namespace Darwin_ProcessInfo
namespace utils
{
#ifdef _WIN32
+#if !defined(ARCH_X64)
// Some helpers for sanity
const auto read_reg_dword = [](HKEY hKey, std::string_view value_name) -> std::pair<bool, DWORD>
{
@@ -110,7 +111,6 @@ namespace utils
return { true, sz };
};
-#if !defined(ARCH_X64)
// Alternative way to read OS version using the registry.
static std::string get_fallback_windows_version()
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.