[Bf-blender-cvs] [2bbbed9f014] soc-2021-curves: Suppressed several build warnings

dilithjay noreply at git.blender.org
Fri Aug 6 05:15:10 CEST 2021


Commit: 2bbbed9f014e22deac8156de66441f98ab6ec6ac
Author: dilithjay
Date:   Thu Aug 5 15:13:26 2021 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB2bbbed9f014e22deac8156de66441f98ab6ec6ac

Suppressed several build warnings

===================================================================

M	source/blender/editors/curve/editcurve_pen.c

===================================================================

diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index 765952279a5..f1157d4f9b6 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -619,7 +619,6 @@ static bool is_curve_nearby(ViewContext *vc, wmOperator *op, const wmEvent *even
 {
   Curve *cu = vc->obedit->data;
   ListBase *nurbs = BKE_curve_editNurbs_get(cu);
-  float mouse_point[2] = {(float)event->mval[0], (float)event->mval[1]};
 
   CutBeztData data = {.bezt_index = 0,
                       .min_dist = 10000,
@@ -676,7 +675,6 @@ static void move_segment(MoveSegmentData *seg_data, const wmEvent *event, ViewCo
   }
   bezt1->f1 = bezt1->f2 = bezt1->f3 = bezt2->f1 = bezt2->f2 = bezt2->f3 = 1;
 
-  float mouse_point[2] = {(float)event->mval[0], (float)event->mval[1]};
   float mouse_3d[3];
   mouse_location_to_worldspace(event->mval, bezt1->vec[1], vc, mouse_3d);
 
@@ -722,8 +720,8 @@ static void move_segment(MoveSegmentData *seg_data, const wmEvent *event, ViewCo
   }
 }
 
-/* Close the spline if endpoints are selected consecutively. Returns true if endpoints selected. */
-static bool close_loop_if_endpoints(
+/* Close the spline if endpoints are selected consecutively. */
+static void close_loop_if_endpoints(
     Nurb *sel_nu, BezTriple *sel_bezt, BPoint *sel_bp, ViewContext *vc, bContext *C)
 {
   if (sel_bezt || sel_bp) {
@@ -908,7 +906,7 @@ static int curve_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
         else {
           copy_v2_v2_int(vc.mval, event->mval);
           if (nu && !(nu->flagu & CU_NURB_CYCLIC)) {
-            bool is_endpoints = close_loop_if_endpoints(nu, bezt, bp, &vc, C);
+            close_loop_if_endpoints(nu, bezt, bp, &vc, C);
 
             /* Set "new" to true to be able to click and drag to control handles when added. */
             RNA_boolean_set(op->ptr, "new", true);



More information about the Bf-blender-cvs mailing list