Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2022-03-16 12:57:19 +0300
committerSergey Sharybin <sergey@blender.org>2022-03-18 14:07:08 +0300
commitc3ecfdf40b02f7d12775f1ded2f039d40f1470bb (patch)
tree1819bfb4c77444a82adfc79a7dbbfd5f2679e62e
parent2252bc6a5527cd7360d1ccfe7a2d1bc640a8dfa6 (diff)
Cleanup: Compilation warnings
Mainly -Wset-but-unused-variable. Makes default compilation on macOS way less noisy. Differential Revision: https://developer.blender.org/D14357
-rw-r--r--intern/cycles/session/tile.cpp2
-rw-r--r--intern/dualcon/intern/octree.cpp4
-rw-r--r--intern/ghost/intern/GHOST_ContextCGL.mm6
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm2
-rw-r--r--intern/mantaflow/intern/MANTA_main.cpp2
-rw-r--r--intern/mikktspace/mikktspace.c8
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c3
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.cc57
-rw-r--r--source/blender/blenkernel/intern/particle_child.c6
-rw-r--r--source/blender/blenlib/intern/delaunay_2d.cc3
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c2
-rw-r--r--source/blender/editors/io/io_collada.c8
-rw-r--r--source/blender/editors/mesh/editmesh_rip_edge.c3
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c3
-rw-r--r--source/blender/editors/space_action/space_action.c4
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c2
-rw-r--r--source/blender/editors/space_nla/space_nla.c6
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c4
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_util.c2
-rw-r--r--source/blender/gpu/intern/gpu_shader_dependency.cc7
-rw-r--r--source/blender/io/alembic/intern/alembic_capi.cc1
-rw-r--r--source/blender/python/intern/bpy_props.c4
23 files changed, 52 insertions, 91 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
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index ce07e501897..d70ab8ed606 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -5244,7 +5244,6 @@ static void dynamic_paint_effect_shrink_cb(void *__restrict userdata,
PaintPoint *pPoint = &((PaintPoint *)sData->type_data)[index];
const PaintPoint *prevPoint = data->prevPoint;
const float eff_scale = data->eff_scale;
- float totalAlpha = 0.0f;
const int *n_index = sData->adj_data->n_index;
const int *n_target = sData->adj_data->n_target;
@@ -5257,8 +5256,6 @@ static void dynamic_paint_effect_shrink_cb(void *__restrict userdata,
const PaintPoint *pPoint_prev = &prevPoint[n_target[n_idx]];
float a_factor, ea_factor, w_factor;
- totalAlpha += pPoint_prev->e_color[3];
-
/* Check if neighboring point has lower alpha,
* if so, decrease this point's alpha as well. */
if (pPoint->color[3] <= 0.0f && pPoint->e_color[3] <= 0.0f && pPoint->wetness <= 0.0f) {
diff --git a/source/blender/blenkernel/intern/mesh_validate.cc b/source/blender/blenkernel/intern/mesh_validate.cc
index fb526354305..4374659bff8 100644
--- a/source/blender/blenkernel/intern/mesh_validate.cc
+++ b/source/blender/blenkernel/intern/mesh_validate.cc
@@ -1049,41 +1049,40 @@ bool BKE_mesh_validate_all_customdata(CustomData *vdata,
bool BKE_mesh_validate(Mesh *me, const bool do_verbose, const bool cddata_check_mask)
{
- bool is_valid = true;
bool changed;
if (do_verbose) {
CLOG_INFO(&LOG, 0, "MESH: %s", me->id.name + 2);
}
- is_valid &= BKE_mesh_validate_all_customdata(&me->vdata,
- me->totvert,
- &me->edata,
- me->totedge,
- &me->ldata,
- me->totloop,
- &me->pdata,
- me->totpoly,
- cddata_check_mask,
- do_verbose,
- true,
- &changed);
-
- is_valid &= BKE_mesh_validate_arrays(me,
- me->mvert,
- me->totvert,
- me->medge,
- me->totedge,
- me->mface,
- me->totface,
- me->mloop,
- me->totloop,
- me->mpoly,
- me->totpoly,
- me->dvert,
- do_verbose,
- true,
- &changed);
+ BKE_mesh_validate_all_customdata(&me->vdata,
+ me->totvert,
+ &me->edata,
+ me->totedge,
+ &me->ldata,
+ me->totloop,
+ &me->pdata,
+ me->totpoly,
+ cddata_check_mask,
+ do_verbose,
+ true,
+ &changed);
+
+ BKE_mesh_validate_arrays(me,
+ me->mvert,
+ me->totvert,
+ me->medge,
+ me->totedge,
+ me->mface,
+ me->totface,
+ me->mloop,
+ me->totloop,
+ me->mpoly,
+ me->totpoly,
+ me->dvert,
+ do_verbose,
+ true,
+ &changed);
if (changed) {
DEG_id_tag_update(&me->id, ID_RECALC_GEOMETRY_ALL_MODES);
diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index 8106ae8b302..5dba4d3f003 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -142,9 +142,6 @@ static void do_kink_spiral(ParticleThreadContext *ctx,
float kink_freq = part->kink_freq;
float kink_shape = part->kink_shape;
float kink_axis_random = part->kink_axis_random;
- float rough1 = part->rough1;
- float rough2 = part->rough2;
- float rough_end = part->rough_end;
ParticlePathIterator iter;
ParticleCacheKey *key;
@@ -164,9 +161,6 @@ static void do_kink_spiral(ParticleThreadContext *ctx,
if (ptex) {
kink_amp *= ptex->kink_amp;
kink_freq *= ptex->kink_freq;
- rough1 *= ptex->rough1;
- rough2 *= ptex->rough2;
- rough_end *= ptex->roughe;
}
cut_time = (totkeys - 1) * ptex->length;
diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc
index 4a02072e770..e6164c98402 100644
--- a/source/blender/blenlib/intern/delaunay_2d.cc
+++ b/source/blender/blenlib/intern/delaunay_2d.cc
@@ -2202,7 +2202,6 @@ void add_face_constraints(CDT_state<T> *cdt_state,
{
int nv = input.vert.size();
int nf = input.face.size();
- int fstart = 0;
SymEdge<T> *face_symedge0 = nullptr;
CDTArrangement<T> *cdt = &cdt_state->cdt;
int maxflen = 0;
@@ -2221,7 +2220,6 @@ void add_face_constraints(CDT_state<T> *cdt_state,
int flen = input.face[f].size();
if (flen <= 2) {
/* Ignore faces with fewer than 3 vertices. */
- fstart += flen;
continue;
}
int fedge_start = (f + 1) * cdt_state->face_edge_offset;
@@ -2266,7 +2264,6 @@ void add_face_constraints(CDT_state<T> *cdt_state,
add_face_ids(cdt_state, face_symedge0, f, fedge_start, fedge_end);
}
}
- fstart += flen;
}
}
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 07d4172d037..81a392d38a5 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -517,7 +517,6 @@ static bool bm_decim_triangulate_begin(BMesh *bm, int *r_edges_tri_tot)
{
BMIter iter;
BMFace *f;
- bool has_quad = false;
bool has_ngon = false;
bool has_cut = false;
@@ -533,7 +532,6 @@ static bool bm_decim_triangulate_begin(BMesh *bm, int *r_edges_tri_tot)
BM_elem_index_set(l_iter, -1); /* set_dirty */
} while ((l_iter = l_iter->next) != l_first);
- has_quad |= (f->len > 3);
has_ngon |= (f->len > 4);
}
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index 1d5c9d717d0..dc62212bf53 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -221,14 +221,6 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
export_settings.limit_precision = limit_precision != 0;
export_settings.keep_bind_info = keep_bind_info != 0;
- int includeFilter = OB_REL_NONE;
- if (export_settings.include_armatures) {
- includeFilter |= OB_REL_MOD_ARMATURE;
- }
- if (export_settings.include_children) {
- includeFilter |= OB_REL_CHILDREN_RECURSIVE;
- }
-
export_count = collada_export(C, &export_settings);
if (export_count == 0) {
diff --git a/source/blender/editors/mesh/editmesh_rip_edge.c b/source/blender/editors/mesh/editmesh_rip_edge.c
index 6b3a796ab0d..85426acb905 100644
--- a/source/blender/editors/mesh/editmesh_rip_edge.c
+++ b/source/blender/editors/mesh/editmesh_rip_edge.c
@@ -125,7 +125,7 @@ static int edbm_rip_edge_invoke(bContext *C, wmOperator *UNUSED(op), const wmEve
#ifdef USE_TRICKY_EXTEND
/* first check if we can select the edge to split based on selection-only */
- int tot_sel = 0, tot = 0;
+ int tot_sel = 0;
BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) {
if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
@@ -133,7 +133,6 @@ static int edbm_rip_edge_invoke(bContext *C, wmOperator *UNUSED(op), const wmEve
e_best = e;
tot_sel += 1;
}
- tot += 1;
}
}
if (tot_sel != 1) {
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 10d121ffd32..2181b652d16 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -2302,7 +2302,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
BMIter iter;
const bool use_ccw = RNA_boolean_get(op->ptr, "use_ccw");
- int tot_rotate_all = 0, tot_failed_all = 0;
+ int tot_failed_all = 0;
bool no_selected_edges = true, invalid_selected_edges = true;
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -2360,7 +2360,6 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
const int tot_rotate = BMO_slot_buffer_len(bmop.slots_out, "edges.out");
const int tot_failed = tot - tot_rotate;
- tot_rotate_all += tot_rotate;
tot_failed_all += tot_failed;
if (tot_failed != 0) {
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 20e9d21455f..7eba3d49616 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -170,12 +170,8 @@ static void action_main_region_draw(const bContext *C, ARegion *region)
bAnimContext ac;
View2D *v2d = &region->v2d;
short marker_flag = 0;
- short cfra_flag = 0;
UI_view2d_view_ortho(v2d);
- if (saction->flag & SACTION_DRAWTIME) {
- cfra_flag |= DRAWCFRA_UNIT_SECONDS;
- }
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 0d1ff71e567..6660ff3b78b 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -271,7 +271,6 @@ static int delete_marker_exec(bContext *C, wmOperator *UNUSED(op))
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
const int framenr = ED_space_clip_get_clip_frame_number(sc);
- bool has_selection = false;
bool changed = false;
ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
@@ -281,7 +280,6 @@ static int delete_marker_exec(bContext *C, wmOperator *UNUSED(op))
if (TRACK_VIEW_SELECTED(sc, track)) {
MovieTrackingMarker *marker = BKE_tracking_marker_get_exact(track, framenr);
if (marker != NULL) {
- has_selection |= track->markersnr > 1;
clip_delete_marker(C, clip, track, marker);
changed = true;
}
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 3e7784d0364..42d3d841f4b 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -216,7 +216,6 @@ static void nla_main_region_draw(const bContext *C, ARegion *region)
Scene *scene = CTX_data_scene(C);
bAnimContext ac;
View2D *v2d = &region->v2d;
- short cfra_flag = 0;
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
@@ -240,11 +239,6 @@ static void nla_main_region_draw(const bContext *C, ARegion *region)
UI_view2d_text_cache_draw(region);
}
- /* current frame */
- if (snla->flag & SNLA_DRAWTIME) {
- cfra_flag |= DRAWCFRA_UNIT_SECONDS;
- }
-
/* markers */
UI_view2d_view_orthoSpecial(region, v2d, 1);
int marker_draw_flag = DRAW_MARKERS_MARGIN;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 9370b349cb4..0ed366209f6 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -2681,7 +2681,6 @@ void draw_timeline_seq(const bContext *C, ARegion *region)
Editing *ed = SEQ_editing_get(scene);
SpaceSeq *sseq = CTX_wm_space_seq(C);
View2D *v2d = &region->v2d;
- short cfra_flag = 0;
float col[3];
seq_prefetch_wm_notify(C, scene);
@@ -2728,9 +2727,6 @@ void draw_timeline_seq(const bContext *C, ARegion *region)
}
UI_view2d_view_ortho(v2d);
- if ((sseq->flag & SEQ_DRAWFRAMES) == 0) {
- cfra_flag |= DRAWCFRA_UNIT_SECONDS;
- }
UI_view2d_view_orthoSpecial(region, v2d, 1);
int marker_draw_flag = DRAW_MARKERS_MARGIN;
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 3f7c7745bff..5ad326c19e5 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -4021,7 +4021,7 @@ static void p_smooth(PChart *chart)
PFace *f;
int j, it2, maxiter2, it;
int nedges = chart->nedges, nwheel, gridx, gridy;
- int edgesx, edgesy, nsize, esize, i, x, y, maxiter, totiter;
+ int edgesx, edgesy, nsize, esize, i, x, y, maxiter;
float minv[2], maxv[2], median, invmedian, avglen2d, avglen3d;
float center[2], dx, dy, *nodes, dlimit, d, *oldnodesx, *oldnodesy;
float *nodesx, *nodesy, *hedges, *vedges, climit, moved, padding;
@@ -4185,7 +4185,6 @@ static void p_smooth(PChart *chart)
/* smooth the grid */
maxiter = 10;
- totiter = 0;
climit = 0.00001f * nsize;
for (it = 0; it < maxiter; it++) {
@@ -4210,7 +4209,6 @@ static void p_smooth(PChart *chart)
for (it2 = 0; it2 < maxiter2; it2++) {
d = 0.0f;
- totiter += 1;
memcpy(oldnodesx, nodesx, sizeof(float) * nsize);
memcpy(oldnodesy, nodesy, sizeof(float) * nsize);
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_util.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_util.c
index 93a3b33e713..4ea17b25995 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_util.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_util.c
@@ -244,4 +244,6 @@ void lineart_count_and_print_render_buffer_memory(LineartRenderBuffer *rb)
total += sum_this;
sum_this = 0;
count_this = 0;
+
+ (void)total; /* Ignored. */
}
diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc
index 5b7df035acd..59481b514eb 100644
--- a/source/blender/gpu/intern/gpu_shader_dependency.cc
+++ b/source/blender/gpu/intern/gpu_shader_dependency.cc
@@ -8,6 +8,7 @@
* shader files.
*/
+#include <iomanip>
#include <iostream>
#include "BLI_map.hh"
@@ -136,15 +137,14 @@ struct GPUSource {
int64_t line_end = input.find("\n", offset);
int64_t line_start = input.rfind("\n", offset) + 1;
int64_t char_number = offset - line_start + 1;
- char line_prefix[16] = "";
- SNPRINTF(line_prefix, "%5ld | ", line_number);
/* TODO Use clog. */
std::cout << fullpath << ":" << line_number << ":" << char_number;
std::cout << " error: " << message << "\n";
- std::cout << line_prefix << input.substr(line_start, line_end - line_start) << "\n";
+ std::cout << std::setw(5) << line_number << " | "
+ << input.substr(line_start, line_end - line_start) << "\n";
std::cout << " | ";
for (int64_t i = 0; i < char_number - 1; i++) {
std::cout << " ";
@@ -361,6 +361,7 @@ void gpu_shader_dependency_init()
errors += value->init_dependencies(*g_sources);
}
BLI_assert_msg(errors == 0, "Dependency errors detected: Aborting");
+ UNUSED_VARS_NDEBUG(errors);
}
void gpu_shader_dependency_exit()
diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc
index f8267d19d8f..769285c247f 100644
--- a/source/blender/io/alembic/intern/alembic_capi.cc
+++ b/source/blender/io/alembic/intern/alembic_capi.cc
@@ -274,6 +274,7 @@ static std::pair<bool, AbcObjectReader *> visit_object(
children_claiming_this_object += child_claims_this_object ? 1 : 0;
}
BLI_assert(children_claiming_this_object == claiming_child_readers.size());
+ UNUSED_VARS_NDEBUG(children_claiming_this_object);
AbcObjectReader *reader = nullptr;
const MetaData &md = object.getMetaData();
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 85a477599cd..6c58e2e3a30 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -1897,7 +1897,6 @@ static const EnumPropertyItem *enum_items_from_py(PyObject *seq_fast,
PyObject *item;
const Py_ssize_t seq_len = PySequence_Fast_GET_SIZE(seq_fast);
PyObject **seq_fast_items = PySequence_Fast_ITEMS(seq_fast);
- Py_ssize_t totbuf = 0;
int i;
short default_used = 0;
const char *default_str_cmp = NULL;
@@ -1987,9 +1986,6 @@ static const EnumPropertyItem *enum_items_from_py(PyObject *seq_fast,
}
items[i] = tmp;
-
- /* calculate combine string length */
- totbuf += id_str_size + name_str_size + desc_str_size + 3; /* 3 is for '\0's */
}
else if (item == Py_None) {
/* Only set since the rest is cleared. */