[Bf-blender-cvs] [c038bbbce2b] greasepencil-object: Silence warnings

Dalai Felinto noreply at git.blender.org
Thu Nov 23 13:18:53 CET 2017


Commit: c038bbbce2b615185388e182dce49f894a373056
Author: Dalai Felinto
Date:   Thu Nov 23 10:17:22 2017 -0200
Branches: greasepencil-object
https://developer.blender.org/rBc038bbbce2b615185388e182dce49f894a373056

Silence warnings

Please keep the code warnings-free as much as possible.

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

M	source/blender/draw/engines/gpencil/gpencil_engine.c
M	source/blender/editors/gpencil/gpencil_utils.c
M	source/blender/modifiers/intern/MOD_gpencilbuild.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 9cfe5df5760..0e76b00e69e 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -255,10 +255,9 @@ static void GPENCIL_cache_init(void *vedata)
 		psl->edit_pass = DRW_pass_create("GPencil Edit Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND);
 		
 		/* detect if playing animation */
-		int oldsts = stl->storage->playing;
 		stl->storage->playing = 0;
 		if (draw_ctx->evil_C) {
-			stl->storage->playing = ED_screen_animation_playing(CTX_wm_manager(draw_ctx->evil_C));
+			stl->storage->playing = ED_screen_animation_playing(CTX_wm_manager(draw_ctx->evil_C)) != NULL ? 1 : 0;
 		}
 		/* detect if painting session */
 		bGPdata *obact_gpd = NULL;
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index b6327bc62ae..ef2e9bd1b3f 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1071,7 +1071,7 @@ void ED_gpencil_add_to_cache(tGPencilSort *cache, RegionView3D *rv3d, Base *base
 }
 
 /* reproject the points of the stroke to a plane locked to axis to avoid stroke offset */
-void ED_gp_project_stroke_to_plane(Object *ob, RegionView3D *rv3d, bGPDstroke *gps, const float origin[3], const int axis, char type)
+void ED_gp_project_stroke_to_plane(Object *ob, RegionView3D *rv3d, bGPDstroke *gps, const float origin[3], const int axis, char UNUSED(type))
 {
 	float plane_normal[3];
 	float vn[3];
@@ -1114,7 +1114,7 @@ void ED_gp_project_stroke_to_plane(Object *ob, RegionView3D *rv3d, bGPDstroke *g
 }
 
 /* reproject one points to a plane locked to axis to avoid stroke offset */
-void ED_gp_project_point_to_plane(Object *ob, RegionView3D *rv3d, const float origin[3], const int axis, char type, bGPDspoint *pt)
+void ED_gp_project_point_to_plane(Object *ob, RegionView3D *rv3d, const float origin[3], const int axis, char UNUSED(type), bGPDspoint *pt)
 {
 	float plane_normal[3];
 	float vn[3];
diff --git a/source/blender/modifiers/intern/MOD_gpencilbuild.c b/source/blender/modifiers/intern/MOD_gpencilbuild.c
index 557f32a2aab..0b43dc4bdda 100644
--- a/source/blender/modifiers/intern/MOD_gpencilbuild.c
+++ b/source/blender/modifiers/intern/MOD_gpencilbuild.c
@@ -43,7 +43,7 @@
 #include "MOD_modifiertypes.h"
 #include "MOD_gpencil_util.h"
 
-static void initData(ModifierData *md)
+static void initData(ModifierData *UNUSED(md))
 {
 	//GpencilBuildModifierData *gpmd = (GpencilBuildModifierData *)md;
 }
@@ -57,11 +57,11 @@ static void generateStrokes(ModifierData *md, const EvaluationContext *eval_ctx,
 	                        Object *ob, bGPDlayer *gpl, bGPDframe *gpf,
 	                        int modifier_index)
 {
-	
+	UNUSED_VARS(md, eval_ctx, ob, gpl, gpf, modifier_index);
 }
 
-static void bakeModifierGP(const bContext *C, const EvaluationContext *UNUSED(eval_ctx),
-                           ModifierData *md, Object *ob)
+static void bakeModifierGP(const bContext *UNUSED(C), const EvaluationContext *UNUSED(eval_ctx),
+                           ModifierData *UNUSED(md), Object *ob)
 {
 	bGPdata *gpd = ob->data;



More information about the Bf-blender-cvs mailing list