From 69eba0d29570c5829d7bb02c720366c120230fb5 Mon Sep 17 00:00:00 2001 From: Reg Tiangha Date: Thu, 21 Mar 2024 18:49:55 -0600 Subject: [PATCH 1/4] fix build issue with gcc 13.2.0 --- src/core/hle/service/soc/soc_u.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/soc/soc_u.cpp b/src/core/hle/service/soc/soc_u.cpp index 810b4c41e..12bc0e401 100644 --- a/src/core/hle/service/soc/soc_u.cpp +++ b/src/core/hle/service/soc/soc_u.cpp @@ -2251,7 +2251,7 @@ std::optional SOC_U::GetDefaultInterfaceInfo() { socklen_t s_info_len = sizeof(struct sockaddr_in); sockaddr_in s_info; - if ((sock_fd = ::socket(AF_INET, SOCK_STREAM, 0)) == -1) { + if (static_cast(sock_fd = ::socket(AF_INET, SOCK_STREAM, 0)) == -1) { return std::nullopt; } @@ -2269,7 +2269,7 @@ std::optional SOC_U::GetDefaultInterfaceInfo() { #ifdef _WIN32 sock_fd = WSASocket(AF_INET, SOCK_DGRAM, 0, 0, 0, 0); - if (sock_fd == SOCKET_ERROR) { + if (static_cast(sock_fd) == SOCKET_ERROR) { return std::nullopt; } From 0500b993e0fc93799de2ba03bbdf085693dd92f0 Mon Sep 17 00:00:00 2001 From: Reg Tiangha Date: Thu, 21 Mar 2024 07:55:24 -0600 Subject: [PATCH 2/4] Copilot AI suggestions to comply with LLVM 19 --- src/citra_qt/util/graphics_device_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/citra_qt/util/graphics_device_info.cpp b/src/citra_qt/util/graphics_device_info.cpp index f4997b284..3b1cac925 100644 --- a/src/citra_qt/util/graphics_device_info.cpp +++ b/src/citra_qt/util/graphics_device_info.cpp @@ -22,7 +22,7 @@ QString GetOpenGLRenderer() { QOpenGLContext context; if (context.create()) { context.makeCurrent(&surface); - return QString::fromUtf8(context.functions()->glGetString(GL_RENDERER)); + return QString::fromUtf8(reinterpret_cast(context.functions()->glGetString(GL_RENDERER))); } else { return QStringLiteral(""); } From b90569700c1836bdef3ce5e69f5a94a23a3c6d84 Mon Sep 17 00:00:00 2001 From: Reg Tiangha Date: Thu, 21 Mar 2024 14:27:37 -0600 Subject: [PATCH 3/4] fix build error with modern openal-soft --- src/audio_core/openal_sink.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/audio_core/openal_sink.cpp b/src/audio_core/openal_sink.cpp index 3129910fd..9f9941f63 100644 --- a/src/audio_core/openal_sink.cpp +++ b/src/audio_core/openal_sink.cpp @@ -73,8 +73,9 @@ OpenALSink::OpenALSink(std::string device_name) : impl(std::make_unique()) auto alBufferCallbackSOFT = reinterpret_cast(alGetProcAddress("alBufferCallbackSOFT")); - alBufferCallbackSOFT(impl->buffer, AL_FORMAT_STEREO16, native_sample_rate, &Impl::Callback, - impl.get()); + alBufferCallbackSOFT(impl->buffer, AL_FORMAT_STEREO16, native_sample_rate, + reinterpret_cast(&Impl::Callback), impl.get()); + if (alGetError() != AL_NO_ERROR) { LOG_CRITICAL(Audio_Sink, "alBufferCallbackSOFT failed: {}", alGetError()); Close(); From 12b30be45eb2063a0883d8865a028a67dd4953f6 Mon Sep 17 00:00:00 2001 From: Reg Tiangha Date: Sat, 23 Mar 2024 09:53:04 -0600 Subject: [PATCH 4/4] apply clang-format --- src/citra_qt/util/graphics_device_info.cpp | 3 ++- src/core/hle/service/soc/soc_u.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/citra_qt/util/graphics_device_info.cpp b/src/citra_qt/util/graphics_device_info.cpp index 3b1cac925..8653ba8bd 100644 --- a/src/citra_qt/util/graphics_device_info.cpp +++ b/src/citra_qt/util/graphics_device_info.cpp @@ -22,7 +22,8 @@ QString GetOpenGLRenderer() { QOpenGLContext context; if (context.create()) { context.makeCurrent(&surface); - return QString::fromUtf8(reinterpret_cast(context.functions()->glGetString(GL_RENDERER))); + return QString::fromUtf8( + reinterpret_cast(context.functions()->glGetString(GL_RENDERER))); } else { return QStringLiteral(""); } diff --git a/src/core/hle/service/soc/soc_u.cpp b/src/core/hle/service/soc/soc_u.cpp index 12bc0e401..ae2ecfcb2 100644 --- a/src/core/hle/service/soc/soc_u.cpp +++ b/src/core/hle/service/soc/soc_u.cpp @@ -2251,7 +2251,7 @@ std::optional SOC_U::GetDefaultInterfaceInfo() { socklen_t s_info_len = sizeof(struct sockaddr_in); sockaddr_in s_info; - if (static_cast(sock_fd = ::socket(AF_INET, SOCK_STREAM, 0)) == -1) { + if (static_cast(sock_fd = ::socket(AF_INET, SOCK_STREAM, 0)) == -1) { return std::nullopt; }