forked from mirrors/0ad
Remove unused variables
This fixes -Wunused-but-set-variable with FreeBSD's clang17.
This commit is contained in:
@@ -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();
|
||||
|
||||
+3
-7
@@ -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; t<iNrTrianglesIn; t++)
|
||||
{
|
||||
for (i=0; i<3; i++)
|
||||
@@ -777,7 +777,6 @@ static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], cons
|
||||
|
||||
assert(bFound);
|
||||
// if we found our own
|
||||
if (index2rec == index) { ++iNumUniqueVerts; }
|
||||
|
||||
piTriList_in_and_out[offs] = index2rec;
|
||||
}
|
||||
@@ -1215,7 +1214,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
|
||||
STSpace * pSubGroupTspace = NULL;
|
||||
SSubGroup * pUniSubGroups = NULL;
|
||||
int * pTmpMembers = NULL;
|
||||
int iMaxNrFaces=0, iUniqueTspaces=0, g=0, i=0;
|
||||
int iMaxNrFaces=0, g=0, i=0;
|
||||
for (g=0; g<iNrActiveGroups; g++)
|
||||
if (iMaxNrFaces < pGroups[g].iNrFaces)
|
||||
iMaxNrFaces = pGroups[g].iNrFaces;
|
||||
@@ -1235,7 +1234,6 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
|
||||
}
|
||||
|
||||
|
||||
iUniqueTspaces = 0;
|
||||
for (g=0; g<iNrActiveGroups; g++)
|
||||
{
|
||||
const SGroup * pGroup = &pGroups[g];
|
||||
@@ -1314,7 +1312,6 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
|
||||
|
||||
// assign tangent space index
|
||||
assert(bFound || l==iUniqueSubGroups);
|
||||
//piTempTangIndices[f*3+index] = iUniqueTspaces+l;
|
||||
|
||||
// if no match was found we allocate a new subgroup
|
||||
if (!bFound)
|
||||
@@ -1363,10 +1360,9 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
|
||||
}
|
||||
}
|
||||
|
||||
// clean up and offset iUniqueTspaces
|
||||
// clean up
|
||||
for (s=0; s<iUniqueSubGroups; s++)
|
||||
free(pUniSubGroups[s].pTriMembers);
|
||||
iUniqueTspaces += iUniqueSubGroups;
|
||||
}
|
||||
|
||||
// clean up
|
||||
|
||||
-3
@@ -3855,10 +3855,7 @@ static void close_connection(struct mg_connection *conn) {
|
||||
}
|
||||
|
||||
static void discard_current_request_from_buffer(struct mg_connection *conn) {
|
||||
char *buffered;
|
||||
int buffered_len, body_len;
|
||||
|
||||
buffered = conn->buf + conn->request_len;
|
||||
buffered_len = conn->data_len - conn->request_len;
|
||||
assert(buffered_len >= 0);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user