diff --git a/source/blender/blenkernel/intern/armature_update.cc b/source/blender/blenkernel/intern/armature_update.cc index f09ab3954cb..fb5462b344c 100644 --- a/source/blender/blenkernel/intern/armature_update.cc +++ b/source/blender/blenkernel/intern/armature_update.cc @@ -338,7 +338,7 @@ static int position_tail_on_spline(bSplineIKConstraint *ik_data, } /* Calculate the intersection point using the secant root finding method */ - float x0 = 0.0f, x1 = 1.0f, x2 = 0.5f; + float x0 = 0.0f, x1 = 1.0f; float x0_point[3], x1_point[3], start_p[3]; float epsilon = max_fff(1.0f, len_v3(head_pos), len_v3(bp->vec)) * FLT_EPSILON; @@ -364,7 +364,7 @@ static int position_tail_on_spline(bSplineIKConstraint *ik_data, break; } - x2 = x1 - f_x1 * (x1 - x0) / (f_x1 - f_x0); + const float x2 = x1 - f_x1 * (x1 - x0) / (f_x1 - f_x0); x0 = x1; x1 = x2; } diff --git a/source/blender/blenlib/intern/math_geom.cc b/source/blender/blenlib/intern/math_geom.cc index 9eed92e633a..0b5c22f944c 100644 --- a/source/blender/blenlib/intern/math_geom.cc +++ b/source/blender/blenlib/intern/math_geom.cc @@ -2674,7 +2674,7 @@ bool isect_sweeping_sphere_tri_v3(const float p1[3], /* clamp to [0, 1] */ CLAMP(t0, 0.0f, 1.0f); - CLAMP(t1, 0.0f, 1.0f); + // CLAMP(t1, 0.0f, 1.0f); /* UNUSED. */ /*---test inside of tri---*/ /* plane intersection point */ diff --git a/source/blender/editors/curve/editcurve.cc b/source/blender/editors/curve/editcurve.cc index eadcb337cfa..c099856bb0e 100644 --- a/source/blender/editors/curve/editcurve.cc +++ b/source/blender/editors/curve/editcurve.cc @@ -2824,14 +2824,13 @@ static int smooth_exec(bContext *C, wmOperator *op) ListBase *editnurb = object_editcurve_get(obedit); int a, a_end; - bool changed = false; LISTBASE_FOREACH (Nurb *, nu, editnurb) { if (nu->bezt) { /* duplicate the curve to use in weight calculation */ const BezTriple *bezt_orig = static_cast(MEM_dupallocN(nu->bezt)); BezTriple *bezt; - changed = false; + bool changed = false; /* check whether its cyclic or not, and set initial & final conditions */ if (nu->flagu & CU_NURB_CYCLIC) { diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index f84d32ae4be..423675f43dd 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -1834,10 +1834,6 @@ static bool ui_selectcontext_begin(bContext *C, uiBut *but, uiSelectContextStore int i; PointerRNA *link; for (i = 0, link = lb.data(); i < selctx_data->elems_len; i++, link++) { - if (i >= selctx_data->elems_len) { - break; - } - if (!UI_context_copy_to_selected_check(&ptr, link, prop, diff --git a/source/blender/imbuf/intern/jp2.cc b/source/blender/imbuf/intern/jp2.cc index 99846842152..20f4325d9a6 100644 --- a/source/blender/imbuf/intern/jp2.cc +++ b/source/blender/imbuf/intern/jp2.cc @@ -455,7 +455,6 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, if (image->numcomps < 3) { r = image->comps[0].data; - a = (use_alpha) ? image->comps[1].data : nullptr; /* Gray-scale 12bits+ */ if (use_alpha) { @@ -508,7 +507,6 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, if (image->numcomps < 3) { r = image->comps[0].data; - a = (use_alpha) ? image->comps[1].data : nullptr; /* Gray-scale. */ if (use_alpha) { diff --git a/source/blender/makesrna/intern/rna_rna.cc b/source/blender/makesrna/intern/rna_rna.cc index 726de452fe6..83057af3897 100644 --- a/source/blender/makesrna/intern/rna_rna.cc +++ b/source/blender/makesrna/intern/rna_rna.cc @@ -1550,7 +1550,6 @@ static void rna_property_override_diff_propptr(Main *bmain, true, nullptr); opop->tag &= ~LIBOVERRIDE_PROP_OP_TAG_UNUSED; - BLI_assert(opop != nullptr); } BLI_assert(propptr_a->data == propptr_a->owner_id);