From f65c72afafd91f357b6d0a94f906e8cf4baeafe7 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 29 Sep 2011 15:28:22 +0000 Subject: =?UTF-8?q?Commented=20and=20tagged=20some=20unused=20vars,=20adde?= =?UTF-8?q?d=20some=20var=20init=20(gcc=20warnings...).=20Won=E2=80=99t=20?= =?UTF-8?q?go=20further,=20most=20other=20warnings=20are=20from=20GE=20or?= =?UTF-8?q?=20intern/extern=20lib=20code...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/blender/blenkernel/intern/implicit.c | 10 +++++----- source/blender/blenkernel/intern/multires.c | 2 +- source/blender/blenkernel/intern/softbody.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 295669c98c0..cef3eee8c5e 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -913,7 +913,7 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z { // Solves for unknown X in equation AX=B unsigned int conjgrad_loopcount=0, conjgrad_looplimit=100; - float conjgrad_epsilon=0.0001f, conjgrad_lasterror=0; + float conjgrad_epsilon=0.0001f /* , conjgrad_lasterror=0 */ /* UNUSED */; lfVector *q, *d, *tmp, *r; float s, starget, a, s_prev; unsigned int numverts = lA[0].vcount; @@ -964,7 +964,7 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z conjgrad_loopcount++; } - conjgrad_lasterror = s; + /* conjgrad_lasterror = s; */ /* UNUSED */ del_lfvector(q); del_lfvector(d); @@ -1777,7 +1777,7 @@ int cloth_calc_helper_forces(Object *UNUSED(ob), ClothModifierData * clmd, float steps = 55; for (i=0; isprings; node; node=node->next) { - ClothVertex *cv1, *cv2; + /* ClothVertex *cv1, *cv2; */ /* UNUSED */ int v1, v2; float len, c, l, vec[3]; @@ -1786,8 +1786,8 @@ int cloth_calc_helper_forces(Object *UNUSED(ob), ClothModifierData * clmd, float continue; v1 = spring->ij; v2 = spring->kl; - cv1 = cloth->verts + v1; - cv2 = cloth->verts + v2; + /* cv1 = cloth->verts + v1; */ /* UNUSED */ + /* cv2 = cloth->verts + v2; */ /* UNUSED */ len = len_v3v3(cos[v1], cos[v2]); sub_v3_v3v3(vec, cos[v1], cos[v2]); diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index cd264c5ddfd..749930d4278 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -1029,7 +1029,7 @@ static void old_mdisps_convert(MFace *mface, MDisps *mdisp) int nvert = (mface->v4)? 4: 3; int newtotdisp = multires_grid_tot[newlvl]*nvert; int x, y, S; - float (*disps)[3], (*out)[3], u, v; + float (*disps)[3], (*out)[3], u = 0.0f, v = 0.0f; /* Quite gcc barking. */ disps = MEM_callocN(sizeof(float) * 3 * newtotdisp, "multires disps"); diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 2960d8a41e5..784c67d6d77 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -1744,12 +1744,12 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], GHash *hash; GHashIterator *ihash; float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3],d_nvect[3], dv1[3],ve[3],avel[3]={0.0,0.0,0.0}, - vv1[3], vv2[3], vv3[3], vv4[3], coledge[3]={0.0f, 0.0f, 0.0f}, mindistedge = 1000.0f, - outerforceaccu[3],innerforceaccu[3], - facedist,n_mag,force_mag_norm,minx,miny,minz,maxx,maxy,maxz, - innerfacethickness = -0.5f, outerfacethickness = 0.2f, - ee = 5.0f, ff = 0.1f, fa=1; - int a, deflected=0, cavel=0,ci=0; + vv1[3], vv2[3], vv3[3], vv4[3], coledge[3]={0.0f, 0.0f, 0.0f}, mindistedge = 1000.0f, + outerforceaccu[3], innerforceaccu[3], + facedist, /* n_mag, */ /* UNUSED */ force_mag_norm, minx, miny, minz, maxx, maxy, maxz, + innerfacethickness = -0.5f, outerfacethickness = 0.2f, + ee = 5.0f, ff = 0.1f, fa=1; + int a, deflected=0, cavel=0, ci=0; /* init */ *intrusion = 0.0f; hash = vertexowner->soft->scratch->colliderhash; @@ -1869,7 +1869,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], VECSUB(dv1,opco,nv2); /* abuse dv1 to have vertex in question at *origin* of triangle */ cross_v3_v3v3(d_nvect, edge2, edge1); - n_mag = normalize_v3(d_nvect); + /* n_mag = */ /* UNUSED */ normalize_v3(d_nvect); facedist = dot_v3v3(dv1,d_nvect); // so rules are // @@ -1906,7 +1906,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], VECSUB(dv1,opco,nv4); /* abuse dv1 to have vertex in question at *origin* of triangle */ cross_v3_v3v3(d_nvect, edge2, edge1); - n_mag = normalize_v3(d_nvect); + /* n_mag = */ /* UNUSED */ normalize_v3(d_nvect); facedist = dot_v3v3(dv1,d_nvect); if ((facedist > innerfacethickness) && (facedist < outerfacethickness)){ -- cgit v1.2.3