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 /source/blender/editors | |
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 'source/blender/editors')
-rw-r--r-- | source/blender/editors/io/io_collada.c | 8 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip_edge.c | 3 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_action/space_action.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 4 |
8 files changed, 3 insertions, 31 deletions
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 = ®ion->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 = ®ion->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 = ®ion->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); |