[Bf-blender-cvs] [cf86167e6c8] greasepencil-object: GPencil: Fix compiler warnings

Antonio Vazquez noreply at git.blender.org
Sat Mar 7 12:25:30 CET 2020


Commit: cf86167e6c832ab9c0a3bd60212f9f7c11e2a9af
Author: Antonio Vazquez
Date:   Sat Mar 7 12:24:53 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rBcf86167e6c832ab9c0a3bd60212f9f7c11e2a9af

GPencil: Fix compiler warnings

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

M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/gpencil/gpencil_vertex_paint.c
M	source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c

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

diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index d3c2e96c7be..592736cd4f4 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1352,7 +1352,6 @@ static void gp_stroke_soft_refine(bGPDstroke *gps)
 
 /* eraser tool - evaluation per stroke */
 static void gp_stroke_eraser_dostroke(tGPsdata *p,
-                                      bGPDlayer *gpl,
                                       bGPDframe *gpf,
                                       bGPDstroke *gps,
                                       const float mval[2],
@@ -1632,7 +1631,7 @@ static void gp_stroke_doeraser(tGPsdata *p)
        * (e.g. 2D space strokes in the 3D view, if the same datablock is shared)
        */
       if (ED_gpencil_stroke_can_use_direct(p->sa, gps)) {
-        gp_stroke_eraser_dostroke(p, gpl, gpf, gps, p->mval, p->mvalo, calc_radius, &rect);
+        gp_stroke_eraser_dostroke(p, gpf, gps, p->mval, p->mvalo, calc_radius, &rect);
       }
     }
   }
diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c
index 02488dfa348..5b5a306aa25 100644
--- a/source/blender/editors/gpencil/gpencil_vertex_paint.c
+++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c
@@ -629,6 +629,8 @@ static bool brush_smear_apply(tGP_BrushVertexpaintData *gso,
   Brush *brush = gso->brush;
   tGP_Grid *grid = NULL;
   int average_idx[2];
+  ARRAY_SET_ITEMS(average_idx, 0, 0);
+
   bool changed = false;
 
   /* Need some movement, so first input is not done. */
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c
index 43d8626ef38..c5a55f330fd 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c
@@ -81,6 +81,9 @@ static void minter_v3_v3v3v3_ref(
     float *result, float *prev, float *curr, float *next, float *stroke_normal)
 {
   float vec[3], inter1[3], inter2[3];
+  ARRAY_SET_ITEMS(inter1, 0.0f, 0.0f, 0.0f);
+  ARRAY_SET_ITEMS(inter2, 0.0f, 0.0f, 0.0f);
+
   float minter[3];
   if (prev) {
     sub_v3_v3v3(vec, curr, prev);



More information about the Bf-blender-cvs mailing list