[Bf-blender-cvs] [a3677b45362] greasepencil-refactor: Cleanup: GPencil: Remove GCC warnings

Clément Foucault noreply at git.blender.org
Thu Jan 9 16:00:32 CET 2020


Commit: a3677b45362460203992ca2b15d776310c5a0139
Author: Clément Foucault
Date:   Thu Jan 9 15:58:13 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rBa3677b45362460203992ca2b15d776310c5a0139

Cleanup: GPencil: Remove GCC warnings

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

M	source/blender/editors/gpencil/annotate_draw.c
M	source/blender/editors/gpencil/gpencil_data.c
M	source/blender/editors/gpencil/gpencil_sculpt_paint.c
M	source/blender/editors/gpencil/gpencil_uv.c
M	source/blender/editors/gpencil/gpencil_vertex_paint.c
M	source/blender/editors/gpencil/gpencil_weight_paint.c
M	source/blender/makesrna/intern/rna_sculpt_paint.c
M	source/blender/makesrna/intern/rna_userdef.c

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

diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index 42d725239a6..5b5eeccbcd0 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -625,7 +625,7 @@ static void annotation_draw_strokes(bGPdata *UNUSED(gpd),
 }
 
 /* Draw selected verts for strokes being edited */
-static void annotation_draw_strokes_edit(bGPdata *gpd,
+static void annotation_draw_strokes_edit(bGPdata *UNUSED(gpd),
                                          bGPDlayer *gpl,
                                          const bGPDframe *gpf,
                                          int offsx,
@@ -689,6 +689,9 @@ static void annotation_draw_strokes_edit(bGPdata *gpd,
       vsize = bsize + 2;
     }
 
+    /* Why? */
+    UNUSED_VARS(vsize);
+
     float selectColor[4];
     UI_GetThemeColor3fv(TH_GP_VERTEX_SELECT, selectColor);
     selectColor[3] = alpha;
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index c7c121b2f39..315d27aab53 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -1677,7 +1677,7 @@ void GPENCIL_OT_brush_reset(wmOperatorType *ot)
 }
 
 static Brush *gp_brush_get_first_by_mode(Main *bmain,
-                                         Paint *paint,
+                                         Paint *UNUSED(paint),
                                          const enum eContextObjectMode mode,
                                          char tool)
 {
diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index 2e6e8756f46..2e26f021fdc 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -920,12 +920,12 @@ static bool gp_brush_randomize_apply(tGP_BrushEditData *gso,
 
 /* Weight Paint Brush */
 /* Change weight paint for vertex groups */
-static bool gp_brush_weight_apply(tGP_BrushEditData *gso,
-                                  bGPDstroke *gps,
-                                  float UNUSED(rot_eval),
-                                  int pt_index,
-                                  const int radius,
-                                  const int co[2])
+static bool UNUSED_FUNCTION(gp_brush_weight_apply)(tGP_BrushEditData *gso,
+                                                   bGPDstroke *gps,
+                                                   float UNUSED(rot_eval),
+                                                   int pt_index,
+                                                   const int radius,
+                                                   const int co[2])
 {
   /* create dvert */
   BKE_gpencil_dvert_ensure(gps);
diff --git a/source/blender/editors/gpencil/gpencil_uv.c b/source/blender/editors/gpencil/gpencil_uv.c
index b3d7cfdedf7..986624fab34 100644
--- a/source/blender/editors/gpencil/gpencil_uv.c
+++ b/source/blender/editors/gpencil/gpencil_uv.c
@@ -240,9 +240,9 @@ static void gpencil_uv_transform_exit(bContext *C, wmOperator *op)
 
 static void gpencil_transform_fill_cancel(bContext *C, wmOperator *op)
 {
-  GpUvData *opdata;
+  GpUvData *opdata = op->customdata;
+  UNUSED_VARS(opdata);
 
-  opdata = op->customdata;
   gpencil_uv_transform_exit(C, op);
 
   /* need to force redisplay or we may still view the modified result */
diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c
index 028412799fb..807dd7e8eb1 100644
--- a/source/blender/editors/gpencil/gpencil_vertex_paint.c
+++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c
@@ -412,7 +412,7 @@ static void gp_grid_colors_calc(tGP_BrushVertexpaintData *gso)
 
 /* ************************************************ */
 /* Brush Callbacks
-/* This section defines the callbacks used by each brush to perform their magic.
+ * This section defines the callbacks used by each brush to perform their magic.
  * These are called on each point within the brush's radius. */
 
 /* Tint Brush */
diff --git a/source/blender/editors/gpencil/gpencil_weight_paint.c b/source/blender/editors/gpencil/gpencil_weight_paint.c
index 1ca73f075a2..3e7a1862d82 100644
--- a/source/blender/editors/gpencil/gpencil_weight_paint.c
+++ b/source/blender/editors/gpencil/gpencil_weight_paint.c
@@ -246,7 +246,7 @@ static void brush_calc_dvec_2d(tGP_BrushWeightpaintData *gso)
 
 /* ************************************************ */
 /* Brush Callbacks
-/* This section defines the callbacks used by each brush to perform their magic.
+ * This section defines the callbacks used by each brush to perform their magic.
  * These are called on each point within the brush's radius. */
 
 /* Draw Brush */
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 7f973f175d2..3edb060071f 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -528,11 +528,6 @@ static char *rna_GPencilSculptSettings_path(PointerRNA *UNUSED(ptr))
   return BLI_strdup("tool_settings.gpencil_sculpt");
 }
 
-static char *rna_GPencilSculptBrush_path(PointerRNA *UNUSED(ptr))
-{
-  return BLI_strdup("tool_settings.gpencil_sculpt.brush");
-}
-
 static char *rna_GPencilSculptGuide_path(PointerRNA *UNUSED(ptr))
 {
   return BLI_strdup("tool_settings.gpencil_sculpt.guide");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 874c1e75f4a..1a2f9a2dfa8 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4992,15 +4992,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
       {0, NULL, 0, NULL, NULL},
   };
 
-  static const EnumPropertyItem multi_sample_levels[] = {
-      {USER_MULTISAMPLE_NONE, "NONE", 0, "No MultiSample", "Do not use OpenGL MultiSample"},
-      {USER_MULTISAMPLE_2, "2", 0, "MultiSample: 2", "Use 2x OpenGL MultiSample"},
-      {USER_MULTISAMPLE_4, "4", 0, "MultiSample: 4", "Use 4x OpenGL MultiSample"},
-      {USER_MULTISAMPLE_8, "8", 0, "MultiSample: 8", "Use 8x OpenGL MultiSample"},
-      {USER_MULTISAMPLE_16, "16", 0, "MultiSample: 16", "Use 16x OpenGL MultiSample"},
-      {0, NULL, 0, NULL, NULL},
-  };
-
   static const EnumPropertyItem image_draw_methods[] = {
       {IMAGE_DRAW_METHOD_AUTO,
        "AUTO",



More information about the Bf-blender-cvs mailing list