From 5683bb76cc3a60d952c9f58c41adaa5f195dd3f4 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Wed, 1 Dec 2021 18:30:40 -0500 Subject: Fix compiler warnings --- src/client/clientlauncher.cpp | 2 ++ src/client/shader.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/client') diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index 063154316..54c561d11 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -564,6 +564,8 @@ void ClientLauncher::speed_tests() // volatile to avoid some potential compiler optimisations volatile static s16 temp16; volatile static f32 tempf; + // Silence compiler warning + (void)temp16; static v3f tempv3f1; static v3f tempv3f2; static std::string tempstring; diff --git a/src/client/shader.cpp b/src/client/shader.cpp index 1be9ef128..bbb872761 100644 --- a/src/client/shader.cpp +++ b/src/client/shader.cpp @@ -242,11 +242,6 @@ public: MainShaderConstantSetter() : m_world_view_proj("mWorldViewProj") , m_world("mWorld") -#if ENABLE_GLES - , m_world_view("mWorldView") - , m_texture("mTexture") - , m_normal("mNormal") -#endif , m_shadow_view_proj("m_ShadowViewProj") , m_light_direction("v_LightDirection") , m_texture_res("f_textureresolution") @@ -261,6 +256,11 @@ public: , m_perspective_bias1_pixel("xyPerspectiveBias1") , m_perspective_zbias_vertex("zPerspectiveBias") , m_perspective_zbias_pixel("zPerspectiveBias") +#if ENABLE_GLES + , m_world_view("mWorldView") + , m_texture("mTexture") + , m_normal("mNormal") +#endif {} ~MainShaderConstantSetter() = default; -- cgit v1.2.3