[Bf-blender-cvs] [82f30be] gooseberry: Fix for warnings/errors

Campbell Barton noreply at git.blender.org
Thu Oct 30 16:17:32 CET 2014


Commit: 82f30be425da4f6fef3ddeb404684366cd4911e4
Author: Campbell Barton
Date:   Thu Oct 30 16:17:30 2014 +0100
Branches: gooseberry
https://developer.blender.org/rB82f30be425da4f6fef3ddeb404684366cd4911e4

Fix for warnings/errors

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

M	source/blender/blenkernel/intern/collision.c
M	source/blender/blenkernel/intern/effect.c
M	source/blender/blenkernel/intern/key.c
M	source/blender/blenkernel/intern/particle_system.c
M	source/blender/editors/physics/particle_edit.c
M	source/blender/editors/space_view3d/view3d_intern.h
M	source/blender/makesrna/intern/rna_particle.c
M	source/blender/physics/intern/BPH_mass_spring.cpp
M	source/blender/physics/intern/implicit_blender.c

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

diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 91d0ac1..0f9ca3b 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -85,10 +85,12 @@ static unsigned int hash_int_2d(unsigned int kx, unsigned int ky)
 #undef rot
 }
 
+#if 0
 static int hash_vertex(int type, int vertex)
 {
 	return hash_int_2d((unsigned int)type, (unsigned int)vertex);
 }
+#endif
 
 static int hash_collpair(int type, CollPair *collpair)
 {
@@ -1154,7 +1156,7 @@ BLI_INLINE bool cloth_point_face_collision_params(const float p1[3], const float
 }
 
 static CollPair *cloth_point_collpair(float p1[3], float p2[3], MVert *mverts, int bp1, int bp2, int bp3,
-                                      int index_cloth, int index_coll, float epsilon, CollPair *collpair, SimDebugData *debug_data)
+                                      int index_cloth, int index_coll, float epsilon, CollPair *collpair, SimDebugData *UNUSED(debug_data))
 {
 	float *co1 = mverts[bp1].co, *co2 = mverts[bp2].co, *co3 = mverts[bp3].co;
 	float lambda, distance1, distance2;
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 82c3ed8..c18726e 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -1034,7 +1034,7 @@ static unsigned int debug_element_hash(const void *key)
 	return elem->hash;
 }
 
-static int debug_element_compare(const void *a, const void *b)
+static bool debug_element_compare(const void *a, const void *b)
 {
 	const SimDebugElement *elem1 = a;
 	const SimDebugElement *elem2 = b;
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index ee27108..479444c 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -1188,7 +1188,7 @@ float **BKE_key_get_per_block_object_weights(Object *ob, Key *key, WeightsArrayC
 	return per_keyblock_weights;
 }
 
-static float *get_particle_weights_array(ParticleSystem *psys, char *vgroup, WeightsArrayCache *cache)
+static float *get_particle_weights_array(ParticleSystem *UNUSED(psys), char *vgroup, WeightsArrayCache *UNUSED(cache))
 {
 //	MDeformVert *dvert = NULL;
 //	int totvert = 0, defgrp_index = 0;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index d91806b..4db7427 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -3286,6 +3286,7 @@ static void hair_create_input_dm(ParticleSimulationData *sim, int totpoint, int
 	}
 }
 
+#ifdef USE_PARTICLE_PREVIEW
 static void hair_deform_preview_curve(ParticleSystem *psys, ParticleData *pa, float (*deformedVerts)[3], ClothHairRoot *roots)
 {
 	ParticleData *particles = psys->particles;
@@ -3384,7 +3385,7 @@ static void hair_deform_preview_hairs(ParticleSimulationData *sim, float (*defor
 	ParticleSystem *psys = sim->psys;
 	ParticleData *pa;
 	int p;
-	
+
 	pa = psys->particles;
 	for (p = 0; p < psys->totpart; ++p, ++pa) {
 		if (pa->flag & PARS_HAIR_BLEND) {
@@ -3392,6 +3393,7 @@ static void hair_deform_preview_hairs(ParticleSimulationData *sim, float (*defor
 		}
 	}
 }
+#endif
 
 static void do_hair_dynamics(ParticleSimulationData *sim)
 {
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index b739f15..2c3280a 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -4151,7 +4151,7 @@ static void shape_cut(PEData *data, int pa_index)
 	}
 }
 
-static int shape_cut_exec(bContext *C, wmOperator *op)
+static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op))
 {
 	Scene *scene = CTX_data_scene(C);
 	Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 70a7228..582b421 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -52,6 +52,7 @@ struct SimDebugData;
 struct wmNDOFMotionData;
 struct wmOperatorType;
 struct wmWindowManager;
+struct wmKeyConfig;
 
 /* drawing flags: */
 enum {
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 70cc8ee..d44a825 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -784,7 +784,7 @@ static void rna_Particle_active_shape_update(Main *bmain, Scene *scene, PointerR
 		}
 	}
 #endif
-	
+	(void)psys;
 	rna_Particle_redo(bmain, scene, ptr);
 }
 
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index 875b7bf..9b7088d 100644
--- a/source/blender/physics/intern/BPH_mass_spring.cpp
+++ b/source/blender/physics/intern/BPH_mass_spring.cpp
@@ -552,7 +552,7 @@ static void cloth_calc_volume_force(ClothModifierData *clmd)
 	
 	/* 2.0f is an experimental value that seems to give good results */
 	float smoothfac = 2.0f * parms->velocity_smooth;
-	float collfac = 2.0f * parms->collider_friction;
+	// float collfac = 2.0f * parms->collider_friction;
 	float pressfac = parms->pressure;
 	float minpress = parms->pressure_threshold;
 	float gmin[3], gmax[3];
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c
index 7421a7a..1b9a664 100644
--- a/source/blender/physics/intern/implicit_blender.c
+++ b/source/blender/physics/intern/implicit_blender.c
@@ -332,7 +332,6 @@ static void print_sparse_matrix(fmatrix3x3 *m)
 		}
 	}
 }
-#endif
 
 static void print_lvector(lfVector *v, int numverts)
 {
@@ -389,6 +388,7 @@ static void print_bfmatrix(fmatrix3x3 *m)
 	
 	MEM_freeN(t);
 }
+#endif
 
 /* copy 3x3 matrix */
 DO_INLINE void cp_fmatrix(float to[3][3], float from[3][3])




More information about the Bf-blender-cvs mailing list