From 799e9c48c1a210386873ae01a0f208675eafffe7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 22 Jan 2011 03:50:09 +0000 Subject: comment dead code and fix 2 missing NULL checks (pointer used after NULL check and checking against incorrect pointer before use). --- source/blender/blenkernel/intern/implicit.c | 5 +++-- source/blender/blenkernel/intern/particle.c | 4 ++-- source/blender/blenkernel/intern/particle_system.c | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel/intern') diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index fc9c41070dc..8004f23c22a 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1317,8 +1317,9 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, VECSUB(extent, X[s->ij], tvect); - dot = INPR(extent, extent); - length = sqrt(dot); + // SEE MSG BELOW (these are UNUSED) + // dot = INPR(extent, extent); + // length = sqrt(dot); k = clmd->sim_parms->goalspring; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 5526edf0a8c..87c39abd561 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2743,7 +2743,7 @@ void psys_cache_child_paths(ParticleSimulationData *sim, float cfra, int editupd { ParticleThread *pthreads; ParticleThreadContext *ctx; - ParticleCacheKey **cache; + /*ParticleCacheKey **cache;*/ /*UNUSED*/ ListBase threads; int i, totchild, totparent, totthread; @@ -2762,7 +2762,7 @@ void psys_cache_child_paths(ParticleSimulationData *sim, float cfra, int editupd totparent= ctx->totparent; if(editupdate && sim->psys->childcache && totchild == sim->psys->totchildcache) { - cache = sim->psys->childcache; + /*cache = sim->psys->childcache;*/ /*UNUSED*/ } else { /* clear out old and create new empty path cache */ diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 6ec08e76606..62bfde601f6 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3403,7 +3403,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra) PARTICLE_P; float timestep; /* current time */ - float ctime; + /* float ctime; */ /*UNUSED*/ /* frame & time changes */ float dfra, dtime; float birthtime, dietime; @@ -3412,7 +3412,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra) dfra= cfra - psys->cfra; timestep = psys_get_timestep(sim); - ctime= cfra*timestep; + /*ctime= cfra*timestep;*/ /*UNUSED*/ dtime= dfra*timestep; if(dfra<0.0){ -- cgit v1.2.3