From b4b624b97b42a7bd60d4156becec128a22f7d0e8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 11 Dec 2023 17:02:13 -0500 Subject: [PATCH 1/3] WC24PatchEngine: Mark LoadPatches() as static Resolves a -Wmissing-declaration warning, since no prototype existed for the function. --- Source/Core/Core/WC24PatchEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/WC24PatchEngine.cpp b/Source/Core/Core/WC24PatchEngine.cpp index aa62ac7580..b88ca5cb6a 100644 --- a/Source/Core/Core/WC24PatchEngine.cpp +++ b/Source/Core/Core/WC24PatchEngine.cpp @@ -81,7 +81,7 @@ void LoadPatchSection(const Common::IniFile& ini) ReadEnabledAndDisabled(ini, "WC24Patch", &s_patches); } -void LoadPatches() +static void LoadPatches() { const auto& sconfig = SConfig::GetInstance(); // We can only load WC24 Channels. From abb5cc3a3af33954106e81eddcf8c136bbbd4079 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 11 Dec 2023 17:05:03 -0500 Subject: [PATCH 2/3] ShaderAsset: Mark ParseShaderProperties() as static This had no function prototype, so this can be internally linked. Resolves a -Wmissing-declaration warning. --- Source/Core/VideoCommon/Assets/ShaderAsset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/Assets/ShaderAsset.cpp b/Source/Core/VideoCommon/Assets/ShaderAsset.cpp index e58b9bfbb6..9a31421334 100644 --- a/Source/Core/VideoCommon/Assets/ShaderAsset.cpp +++ b/Source/Core/VideoCommon/Assets/ShaderAsset.cpp @@ -14,9 +14,9 @@ namespace VideoCommon { -bool ParseShaderProperties(const VideoCommon::CustomAssetLibrary::AssetID& asset_id, - const picojson::array& properties_data, - std::map* shader_properties) +static bool ParseShaderProperties(const CustomAssetLibrary::AssetID& asset_id, + const picojson::array& properties_data, + std::map* shader_properties) { if (!shader_properties) [[unlikely]] return false; From e8b479627375429accaa24311cea764ad8261f52 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 11 Dec 2023 17:07:56 -0500 Subject: [PATCH 3/3] PostProcessing: Mark helper functions as static These didn't have any prototypes and were generating -Wmissing-declaration warnings. --- Source/Core/VideoCommon/PostProcessing.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/PostProcessing.cpp b/Source/Core/VideoCommon/PostProcessing.cpp index 49b05e6762..615d853a45 100644 --- a/Source/Core/VideoCommon/PostProcessing.cpp +++ b/Source/Core/VideoCommon/PostProcessing.cpp @@ -39,8 +39,8 @@ static const char s_default_pixel_shader_name[] = "default_pre_post_process"; // RGBA16F should have enough quality even if we store colors in gamma space on it. static const AbstractTextureFormat s_intermediary_buffer_format = AbstractTextureFormat::RGBA16F; -bool LoadShaderFromFile(const std::string& shader, const std::string& sub_dir, - std::string& out_code) +static bool LoadShaderFromFile(const std::string& shader, const std::string& sub_dir, + std::string& out_code) { std::string path = File::GetUserPath(D_SHADERS_IDX) + sub_dir + shader + ".glsl"; @@ -769,7 +769,7 @@ std::string PostProcessing::GetFooter() const return {}; } -std::string GetVertexShaderBody() +static std::string GetVertexShaderBody() { std::ostringstream ss; if (g_ActiveConfig.backend_info.bSupportsGeometryShaders) @@ -1002,7 +1002,7 @@ bool PostProcessing::CompilePixelShader() return true; } -bool UseGeometryShaderForPostProcess(bool is_intermediary_buffer) +static bool UseGeometryShaderForPostProcess(bool is_intermediary_buffer) { // We only return true on stereo modes that need to copy // both source texture layers into the target texture layers.