[Bf-blender-cvs] [a750dea74e5] master: Cleanup: warnings, correct assert

Campbell Barton noreply at git.blender.org
Tue Mar 26 00:16:38 CET 2019


Commit: a750dea74e5278d24a800468bcf5f433d4a46bcf
Author: Campbell Barton
Date:   Tue Mar 26 10:15:36 2019 +1100
Branches: master
https://developer.blender.org/rBa750dea74e5278d24a800468bcf5f433d4a46bcf

Cleanup: warnings, correct assert

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

M	source/blender/editors/gpencil/gpencil_edit.c
M	source/blender/makesrna/intern/rna_brush.c
M	source/blender/makesrna/intern/rna_object.c

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

diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 259c9468e76..be63d5cd016 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1329,7 +1329,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
 				/* Remap material */
 				Material *ma = BLI_ghash_lookup(new_colors, POINTER_FROM_INT(new_stroke->mat_nr));
 				new_stroke->mat_nr = BKE_gpencil_get_material_index(ob, ma);
-				BLI_assert(new_stroke >= 0); /* have to add the material first */
+				BLI_assert(new_stroke->mat_nr >= 0); /* have to add the material first */
 			}
 		}
 	}
@@ -3905,7 +3905,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
 	/* create new grease pencil datablock */
 	gpd_dst = BKE_gpencil_data_addnew(bmain, gpd_src->id.name + 2);
 	ob_dst->data = (bGPdata *)gpd_dst;
-	
+
 	/* loop old datablock and separate parts */
 	if ((mode == GP_SEPARATE_POINT) || (mode == GP_SEPARATE_STROKE)) {
 		CTX_DATA_BEGIN(C, bGPDlayer *, gpl, editable_gpencil_layers)
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 1a35fd8d0fb..bbd85639cfb 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -443,7 +443,7 @@ static void rna_Brush_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
 	/*WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, NULL); */
 }
 
-static void rna_Brush_material_update(bContext *C, PointerRNA *ptr)
+static void rna_Brush_material_update(bContext *UNUSED(C), PointerRNA *UNUSED(ptr))
 {
 	/* number of material users changed */
 	WM_main_add_notifier(NC_SPACE | ND_SPACE_PROPERTIES, NULL);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 0eaddf0c44e..bdb1a890431 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -275,7 +275,7 @@ static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA
 	WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id);
 }
 
-static void rna_MaterialIndex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_MaterialIndex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
 	Object *ob = (Object *)ptr->id.data;
 	if (ob && ob->type == OB_GPENCIL) {



More information about the Bf-blender-cvs mailing list