[Bf-blender-cvs] [2103296faae] greasepencil-object: Cleanup compiler warnings

Antonio Vazquez noreply at git.blender.org
Thu Jun 22 12:25:49 CEST 2017


Commit: 2103296faaef78b0bec49386104148e410637c59
Author: Antonio Vazquez
Date:   Thu Jun 22 12:25:33 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB2103296faaef78b0bec49386104148e410637c59

Cleanup compiler warnings

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

M	source/blender/draw/engines/gpencil/gpencil_engine.c
M	source/blender/editors/gpencil/drawgpencil.c
M	source/blender/editors/gpencil/gpencil_paint.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index b8c6410a2df..273bc0701cb 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -166,9 +166,6 @@ static void GPENCIL_cache_init(void *vedata)
 static void GPENCIL_cache_populate(void *vedata, Object *ob)
 {
 	GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
-	const DRWContextState *draw_ctx = DRW_context_state_get();
-	Scene *scene = draw_ctx->scene;
-	ToolSettings *ts = scene->toolsettings;
 
 	/* object datablock (this is not draw now) */
 	if (ob->type == OB_GPENCIL && ob->gpd) {
@@ -182,7 +179,7 @@ static void GPENCIL_cache_populate(void *vedata, Object *ob)
 	}
 }
 
-static void GPENCIL_cache_finish(void *vedata)
+static void GPENCIL_cache_finish(void *UNUSED(vedata))
 {
 	return;
 }
@@ -197,7 +194,6 @@ static void GPENCIL_draw_scene(void *vedata)
 	GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl;
 	GPENCIL_FramebufferList *fbl = ((GPENCIL_Data *)vedata)->fbl;
 	DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
-	DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
 	float clearcol[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
 
 	/* Draw all pending objects */
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index ae283ab6fa5..5a0733048c0 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1625,7 +1625,7 @@ static void gp_draw_data_all(Scene *scene, bGPdata *gpd, int offsx, int offsy, i
                              int cfra, int dflag, const char spacetype)
 {
 	bGPdata *gpd_source = NULL;
-	ToolSettings *ts;
+	ToolSettings *ts = NULL;
 	bGPDbrush *brush = NULL;
 	if (scene) {
 		ts = scene->toolsettings;
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index a21e9ff5858..a6b96a23e1e 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1295,7 +1295,7 @@ static void gp_init_drawing_brush(ToolSettings *ts, tGPsdata *p)
 static void gp_init_palette(tGPsdata *p)
 {
 	Palette *palette;
-	PaletteColor *palcolor;
+	PaletteColor *palcolor = NULL;
 
 	palette = p->palette;




More information about the Bf-blender-cvs mailing list