diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-03-16 12:57:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-03-18 14:07:08 +0300 |
commit | c3ecfdf40b02f7d12775f1ded2f039d40f1470bb (patch) | |
tree | 1819bfb4c77444a82adfc79a7dbbfd5f2679e62e /intern/mikktspace | |
parent | 2252bc6a5527cd7360d1ccfe7a2d1bc640a8dfa6 (diff) |
Cleanup: Compilation warnings
Mainly -Wset-but-unused-variable.
Makes default compilation on macOS way less noisy.
Differential Revision: https://developer.blender.org/D14357
Diffstat (limited to 'intern/mikktspace')
-rw-r--r-- | intern/mikktspace/mikktspace.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c index fe302eb5e7c..794590d30a4 100644 --- a/intern/mikktspace/mikktspace.c +++ b/intern/mikktspace/mikktspace.c @@ -1114,7 +1114,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], 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; @@ -1136,7 +1136,6 @@ static tbool GenerateTSpaces(STSpace psTspace[], return TFALSE; } - iUniqueTspaces = 0; for (g = 0; g < iNrActiveGroups; g++) { const SGroup *pGroup = &pGroups[g]; int iUniqueSubGroups = 0, s = 0; @@ -1211,9 +1210,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], ++l; } - // 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) { @@ -1262,10 +1259,9 @@ static tbool GenerateTSpaces(STSpace psTspace[], } } - // clean up and offset iUniqueTspaces + // clean up for (s = 0; s < iUniqueSubGroups; s++) free(pUniSubGroups[s].pTriMembers); - iUniqueTspaces += iUniqueSubGroups; } // clean up |