From 0a8478c2b1d3c22efbed042a6fd1d13e3db96521 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sat, 30 May 2026 23:16:36 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20silencia=20warnings=20de=20stb=5Fvorbis?= =?UTF-8?q?=20i=20par=C3=A0metre=20no=20usat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/core/audio/audio.cpp | 5 +++++ source/game/gameplay/tilemap_renderer.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/core/audio/audio.cpp b/source/core/audio/audio.cpp index ad58c6a..94a49a1 100644 --- a/source/core/audio/audio.cpp +++ b/source/core/audio/audio.cpp @@ -8,8 +8,13 @@ // Implementación de stb_vorbis (debe estar ANTES de incluir jail_audio.hpp). // clang-format off #undef STB_VORBIS_HEADER_ONLY +// stb_vorbis.c (codi de tercers) dispara -Wtautological-compare; el silenciem +// només per a aquesta inclusió sense afectar el nostre codi. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtautological-compare" // NOLINTNEXTLINE(bugprone-suspicious-include) — stb_vorbis és single-file: el TU principal inclou el .c per portar la implementació. #include "external/stb_vorbis.c" +#pragma GCC diagnostic pop // stb_vorbis.c filtra les macros L, C i R (i PLAYBACK_*) al TU. Les netegem // perquè xocarien amb noms de paràmetres de plantilla en altres headers. #undef L diff --git a/source/game/gameplay/tilemap_renderer.cpp b/source/game/gameplay/tilemap_renderer.cpp index 9d72c7f..c858332 100644 --- a/source/game/gameplay/tilemap_renderer.cpp +++ b/source/game/gameplay/tilemap_renderer.cpp @@ -133,7 +133,7 @@ void TilemapRenderer::setTile(int index, int tile_value) { #endif // Pinta el mapa estático y debug lines -void TilemapRenderer::fillMapTexture(const CollisionMap* /*collision_map*/) { +void TilemapRenderer::fillMapTexture([[maybe_unused]] const CollisionMap* collision_map) { const Uint8 COLOR = stringToColor(bg_color_); auto previous_renderer = Screen::get()->getRendererSurface(); Screen::get()->setRendererSurface(map_surface_);