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 | |
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')
-rw-r--r-- | intern/cycles/session/tile.cpp | 2 | ||||
-rw-r--r-- | intern/dualcon/intern/octree.cpp | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_ContextCGL.mm | 6 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 2 | ||||
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 2 | ||||
-rw-r--r-- | intern/mikktspace/mikktspace.c | 8 |
6 files changed, 14 insertions, 10 deletions
diff --git a/intern/cycles/session/tile.cpp b/intern/cycles/session/tile.cpp index 755e85450a3..82272a7dbf5 100644 --- a/intern/cycles/session/tile.cpp +++ b/intern/cycles/session/tile.cpp @@ -43,7 +43,6 @@ static std::vector<std::string> exr_channel_names_for_passes(const BufferParams static const char *component_suffixes[] = {"R", "G", "B", "A"}; int pass_index = 0; - int num_channels = 0; std::vector<std::string> channel_names; for (const BufferPass &pass : buffer_params.passes) { if (pass.offset == PASS_UNUSED) { @@ -51,7 +50,6 @@ static std::vector<std::string> exr_channel_names_for_passes(const BufferParams } const PassInfo pass_info = pass.get_info(); - num_channels += pass_info.num_components; /* EXR canonically expects first part of channel names to be sorted alphabetically, which is * not guaranteed to be the case with passes names. Assign a prefix based on the pass index diff --git a/intern/dualcon/intern/octree.cpp b/intern/dualcon/intern/octree.cpp index 9e360848e6b..18242d48292 100644 --- a/intern/dualcon/intern/octree.cpp +++ b/intern/dualcon/intern/octree.cpp @@ -242,6 +242,10 @@ void Octree::printMemUsage() dc_printf("Total allocated bytes on disk: %d \n", totalbytes); dc_printf("Total leaf nodes: %d\n", totalLeafs); + + /* Unused when not debuggining. */ + (void)totalbytes; + (void)totalLeafs; } void Octree::resetMinimalEdges() diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm index 9322b6cee7a..dd800ef52a3 100644 --- a/intern/ghost/intern/GHOST_ContextCGL.mm +++ b/intern/ghost/intern/GHOST_ContextCGL.mm @@ -7,6 +7,12 @@ * Definition of GHOST_ContextCGL class. */ +/* Don't generate OpenGL deprecation warning. This is a known thing, and is not something easily + * solvable in a short term. */ +#ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + #include "GHOST_ContextCGL.h" #include <Cocoa/Cocoa.h> diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index f0db6b6fdfc..b6836614962 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1050,8 +1050,6 @@ void GHOST_SystemCocoa::notifyExternalEventProcessed() GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa *window) { - NSArray *windowsList; - windowsList = [NSApp orderedWindows]; if (!validWindow(window)) { return GHOST_kFailure; } diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index 6083c4908a1..282fbdb3f77 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -263,6 +263,8 @@ MANTA::MANTA(int *res, FluidModifierData *fmd) } /* All requested initializations must not fail in constructor. */ BLI_assert(initSuccess); + (void)initSuccess; /* Ignored in release. */ + updatePointers(fmd); } 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 |