diff options
author | Kai Blaschke <kai.blaschke@kb-dev.net> | 2024-02-28 18:11:55 +0100 |
---|---|---|
committer | Kai Blaschke <kai.blaschke@kb-dev.net> | 2024-02-28 18:30:27 +0100 |
commit | cd23817bf1884fee4457ab3381320b0c8fc33f48 (patch) | |
tree | 9440ff3b0386ca9e3b1bac9eda168741ec6debb3 /source/application | |
parent | 28d486446ca176ef0168a7284d85cb49a75a54fb (diff) |
Fixed remaining compiler warnings
Some warnings (e.g. in Opus and the tests) can't be fixed, only suppressed.
Diffstat (limited to 'source/application')
-rw-r--r-- | source/application/StarMainApplication_sdl.cpp | 2 | ||||
-rw-r--r-- | source/application/StarP2PNetworkingService_pc.cpp | 2 | ||||
-rw-r--r-- | source/application/StarPlatformServices_pc.cpp | 2 | ||||
-rw-r--r-- | source/application/StarRenderer_opengl20.cpp | 5 |
4 files changed, 4 insertions, 7 deletions
diff --git a/source/application/StarMainApplication_sdl.cpp b/source/application/StarMainApplication_sdl.cpp index 08d3813..b98da46 100644 --- a/source/application/StarMainApplication_sdl.cpp +++ b/source/application/StarMainApplication_sdl.cpp @@ -819,7 +819,7 @@ private: auto newImage = std::make_shared<Image>(processImageOperations(operations, *image)); // Fix fully transparent pixels inverting the underlying display pixel on Windows (allowing this could be made configurable per cursor later!) - newImage->forEachPixel([](unsigned x, unsigned y, Vec4B& pixel) { if (!pixel[3]) pixel[0] = pixel[1] = pixel[2] = 0; }); + newImage->forEachPixel([](unsigned /*x*/, unsigned /*y*/, Vec4B& pixel) { if (!pixel[3]) pixel[0] = pixel[1] = pixel[2] = 0; }); entry->image = std::move(newImage); diff --git a/source/application/StarP2PNetworkingService_pc.cpp b/source/application/StarP2PNetworkingService_pc.cpp index f13bb62..5bb99f9 100644 --- a/source/application/StarP2PNetworkingService_pc.cpp +++ b/source/application/StarP2PNetworkingService_pc.cpp @@ -81,7 +81,7 @@ void PcP2PNetworkingService::setJoinRemote(HostAddressWithPort location) { setJoinLocation(JoinRemote(location)); } -void Star::PcP2PNetworkingService::setActivityData(String const& title, Maybe<pair<uint16_t, uint16_t>> party) { +void Star::PcP2PNetworkingService::setActivityData(String const&, Maybe<pair<uint16_t, uint16_t>>) { #ifdef STAR_ENABLE_DISCORD_INTEGRATION MutexLocker discordLocker(m_state->discordMutex); #endif diff --git a/source/application/StarPlatformServices_pc.cpp b/source/application/StarPlatformServices_pc.cpp index 8f940b3..9470201 100644 --- a/source/application/StarPlatformServices_pc.cpp +++ b/source/application/StarPlatformServices_pc.cpp @@ -98,7 +98,7 @@ void PcPlatformServicesState::onGameOverlayActivated(GameOverlayActivated_t* cal } #endif -PcPlatformServicesUPtr PcPlatformServices::create(String const& path, StringList platformArguments) { +PcPlatformServicesUPtr PcPlatformServices::create(String const&, StringList platformArguments) { auto services = unique_ptr<PcPlatformServices>(new PcPlatformServices); services->m_state = make_shared<PcPlatformServicesState>(); diff --git a/source/application/StarRenderer_opengl20.cpp b/source/application/StarRenderer_opengl20.cpp index 18f771b..ac141a4 100644 --- a/source/application/StarRenderer_opengl20.cpp +++ b/source/application/StarRenderer_opengl20.cpp @@ -720,7 +720,6 @@ void OpenGl20Renderer::GlRenderBuffer::set(List<RenderPrimitive>& primitives) { float textureIndex = 0.0f; Vec2F textureOffset = {}; - Texture* lastTexture = nullptr; for (auto& primitive : primitives) { if (auto tri = primitive.ptr<RenderTriangle>()) { tie(textureIndex, textureOffset) = addCurrentTexture(std::move(tri->texture)); @@ -781,7 +780,7 @@ bool OpenGl20Renderer::logGlErrorSummary(String prefix) { } else { Logger::error("<UNRECOGNIZED GL ERROR>"); } - } while (error = glGetError()); + } while ((error = glGetError())); return true; } return false; @@ -897,8 +896,6 @@ void OpenGl20Renderer::renderGlBuffer(GlRenderBuffer const& renderBuffer, Mat3F //Assumes the passed effect program is currently in use. void OpenGl20Renderer::setupGlUniforms(Effect& effect) { - GLuint program = effect.program; - m_positionAttribute = effect.getAttribute("vertexPosition"); m_texCoordAttribute = effect.getAttribute("vertexTextureCoordinate"); m_texIndexAttribute = effect.getAttribute("vertexTextureIndex"); |