From b19dbb9bdb9b315050d19dec044a71d8404ff362 Mon Sep 17 00:00:00 2001 From: Itms Date: Thu, 29 Aug 2024 09:45:59 +0200 Subject: [PATCH] Remove unused variables This fixes -Wunused-but-set-variable with FreeBSD's clang17. --- source/lib/tex/tex.cpp | 2 +- source/third_party/mikktspace/mikktspace.cpp | 10 +++------- source/third_party/mongoose/mongoose.cpp | 3 --- source/tools/atlas/AtlasObject/AtlasObjectJS.cpp | 3 --- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/source/lib/tex/tex.cpp b/source/lib/tex/tex.cpp index dc0c98eeb0..b33d7e3aec 100644 --- a/source/lib/tex/tex.cpp +++ b/source/lib/tex/tex.cpp @@ -789,7 +789,7 @@ void Tex::UpdateMIPLevels() const u32 dataPadding = (m_Flags & TEX_DXT) != 0 ? 4 : 1; u32 levelWidth = m_Width, levelHeight = m_Height; - for (u32 level = 0; ; ++level) + for (;;) { const u32 levelDataSize = round_up(levelWidth, dataPadding) * round_up(levelHeight, dataPadding) * m_Bpp / 8; m_MIPLevels.emplace_back(); diff --git a/source/third_party/mikktspace/mikktspace.cpp b/source/third_party/mikktspace/mikktspace.cpp index 54f658ef23..4ad9991639 100644 --- a/source/third_party/mikktspace/mikktspace.cpp +++ b/source/third_party/mikktspace/mikktspace.cpp @@ -743,7 +743,7 @@ static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn) { - int iNumUniqueVerts = 0, t=0, i=0; + int t=0, i=0; for (t=0; tbuf + conn->request_len; buffered_len = conn->data_len - conn->request_len; assert(buffered_len >= 0); diff --git a/source/tools/atlas/AtlasObject/AtlasObjectJS.cpp b/source/tools/atlas/AtlasObject/AtlasObjectJS.cpp index 8792cd82af..c0cccc9ad4 100644 --- a/source/tools/atlas/AtlasObject/AtlasObjectJS.cpp +++ b/source/tools/atlas/AtlasObject/AtlasObjectJS.cpp @@ -152,13 +152,10 @@ json_spirit::Value BuildJSONNode(AtNode::Ptr p) AtNode::child_maptype::const_iterator lower = p->m_Children.lower_bound("item"); AtNode::child_maptype::const_iterator upper = p->m_Children.upper_bound("item"); - unsigned int idx = 0; for (AtNode::child_maptype::const_iterator it = lower; it != upper; ++it) { json_spirit::Value child = BuildJSONNode(it->second); rval.push_back(child); - - ++idx; } return rval;