diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-13 17:17:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-13 17:17:30 +0400 |
commit | 068c62701375e51445a768ab69b74802338f57c1 (patch) | |
tree | 2aca17f045376bde24057f70e8c12fc37ab74b66 | |
parent | 73e2b88f6296c83aaff2b47ed9e1d5debbd2e9df (diff) |
remove unused vars
25 files changed, 56 insertions, 51 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 83533d239db..6e255438fa8 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -890,7 +890,7 @@ static void layerInterp_shapekey(void **sources, float *weights, { float *co = dest, *src; float **in = (float **)sources; - int i, j, k; + int i; if(count <= 0) return; diff --git a/source/blender/blenkernel/intern/editderivedbmesh.c b/source/blender/blenkernel/intern/editderivedbmesh.c index 894fb2185b9..31481b45d9d 100644 --- a/source/blender/blenkernel/intern/editderivedbmesh.c +++ b/source/blender/blenkernel/intern/editderivedbmesh.c @@ -743,7 +743,7 @@ static void bmDM_drawFacesTex_common(DerivedMesh *dm, BMLoop **ls = em->looptris[i]; MTexPoly *tp= CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY); MTFace mtf = {{{0}}}; - unsigned char *cp= NULL; + /*unsigned char *cp= NULL;*/ /*UNUSED*/ int drawSmooth= BM_TestHFlag(ls[0]->f, BM_SMOOTH); int flag; @@ -818,7 +818,7 @@ static void bmDM_drawFacesTex_common(DerivedMesh *dm, BMLoop **ls = em->looptris[i]; MTexPoly *tp= CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY); MTFace mtf = {{{0}}}; - unsigned char *cp= NULL; + /*unsigned char *cp= NULL;*/ /*UNUSED*/ int drawSmooth= BM_TestHFlag(ls[0]->f, BM_SMOOTH); int flag; @@ -939,8 +939,8 @@ static void bmDM_drawMappedFacesGLSL(DerivedMesh *dm, DMVertexAttribs attribs; GPUVertexAttribs gattribs; MTexPoly *tp; - int transp, new_transp, orig_transp, tfoffset; - int i, b, matnr, new_matnr, dodraw, layer; + int transp, new_transp, orig_transp; + int i, b, matnr, new_matnr, dodraw; dodraw = 0; matnr = -1; @@ -1572,7 +1572,6 @@ DerivedMesh *getEditDerivedBMesh(BMEditMesh *em, Object *UNUSED(ob), { EditDerivedBMesh *bmdm = MEM_callocN(sizeof(*bmdm), "bmdm"); BMesh *bm = em->bm; - int i; bmdm->tc = em; diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 4d452b8fe16..d980c9536be 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -2388,7 +2388,7 @@ static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart, MVert *v1, *v2, *v3; double u[3], v[3], w[3]; double n[3] = {0.0, 0.0, 0.0}, l; - int i, s=0; + int i; for(i = 0; i < mpoly->totloop; i++){ v1 = mvert + loopstart[i].v; diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 14af46ff927..eb92c2f3868 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -401,7 +401,7 @@ static void multires_del_higher(MultiresModifierData *mmd, Object *ob, int lvl) if(mdisps && levels > 0) { if(lvl > 0) { - MLoop *ml = me->mloop; + /* MLoop *ml = me->mloop; */ /*UNUSED*/ int nsize = multires_side_tot[lvl]; int hsize = multires_side_tot[mmd->totlvl]; int i, j; diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 506fcf7db78..ae6ea6f4115 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -499,8 +499,8 @@ static int ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm, BLI_array_declare(fVerts); int totvert = dm->getNumVerts(dm); int totedge = dm->getNumEdges(dm); - int totface = dm->getNumTessFaces(dm); - int totpoly = dm->getNumFaces(dm); + /*int totface = dm->getNumTessFaces(dm);*/ /*UNUSED*/ + /*int totpoly = dm->getNumFaces(dm);*/ /*UNUSED*/ int i; int *index; MVert *mvert = dm->getVertArray(dm); @@ -508,7 +508,7 @@ static int ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm, MFace *mface = dm->getTessFaceArray(dm); MVert *mv; MEdge *me; - MFace *mf; + /*MFace *mf;*/ /*UNUSED*/ DMFaceIter *fiter; DMLoopIter *liter; @@ -851,7 +851,7 @@ static void ccgDM_getFinalFace(DerivedMesh *dm, int faceNum, MFace *mf) int offset; int grid; int x, y; - int lastface = ccgSubSurf_getNumFaces(ss) - 1; + /*int lastface = ccgSubSurf_getNumFaces(ss) - 1;*/ /*UNUSED*/ char *faceFlags = cgdm->faceFlags; memset(mf, 0, sizeof(*mf)); @@ -1085,7 +1085,7 @@ static void *cgdm_faceIterCData(void *self, int type, int layer) static void cgdm_loopIterStep(void *self) { cgdm_loopIter *liter = self; - MFace *mf = liter->fiter->mface; + /* MFace *mf = liter->fiter->mface; */ /*UNUSED*/ int i, v1, v2; liter->head.index++; @@ -1162,8 +1162,8 @@ static void cgdm_faceIterFree(void *vfiter) static DMFaceIter *cgdm_newFaceIter(DerivedMesh *dm) { cgdm_faceIter *fiter = MEM_callocN(sizeof(cgdm_faceIter), "cgdm_faceIter"); - MEdge medge; - int i, totedge = cgdm_getNumEdges(dm); + /*MEdge medge;*/ /*UNUSED*/ + /*int totedge = cgdm_getNumEdges(dm);*/ /*UNUSED*/ fiter->cgdm = (CCGDerivedMesh *)dm; fiter->liter.cgdm = (CCGDerivedMesh *)dm; diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h index 8d502a97f06..3f5c2cc9d48 100644 --- a/source/blender/blenlib/BLI_array.h +++ b/source/blender/blenlib/BLI_array.h @@ -87,7 +87,7 @@ behaviour, though it may not be the best in practice. /*grow an array by a specified number of items.*/ #define BLI_array_growitems(arr, num) {int _i; for (_i=0; _i<(num); _i++) {BLI_array_growone(arr);}} -#define BLI_array_free(arr) if (arr && (char *)arr != _##arr##_static) MEM_freeN(arr) +#define BLI_array_free(arr) if (arr && (char *)arr != _##arr##_static) { BLI_array_fake_user(arr); MEM_freeN(arr); } #define BLI_array_pop(arr) ((arr&&_##arr##_count) ? arr[--_##arr##_count] : 0) /*resets the logical size of an array to zero, but doesn't @@ -97,3 +97,6 @@ behaviour, though it may not be the best in practice. /*set the count of the array, doesn't actually increase the allocated array size. don't use this unless you know what you're doing.*/ #define BLI_array_set_length(arr, count) _##arr##_count = (count) + +/*only to prevent unused warnings*/ +#define BLI_array_fake_user(arr) (void)_##arr##_count, (void)_##arr##_tmp, (void)_##arr##_static diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index b5e89530e13..908e6918250 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -158,7 +158,7 @@ static void *new_mem_element(int size) printf("incorrect use of new_mem_element\n"); } else if(size== -1) { - /*keep the first block*/ + /*BMESH_TODO: keep the first block, gives memory leak on exit with 'newmem' */ first = lb.first; BLI_remlink(&lb, first); diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c index bba4ecc56d2..00ac0addd66 100644 --- a/source/blender/bmesh/intern/bmesh_interp.c +++ b/source/blender/bmesh/intern/bmesh_interp.c @@ -520,7 +520,7 @@ static void bmesh_loop_interp_mdisps(BMesh *bm, BMLoop *target, BMFace *source) { MDisps *mdisps; BMLoop *l2; - double x, y, d, v1[3], v2[3], v3[3], v4[3] = {0.0f, 0.0f, 0.0f}, e1[3], e2[3], e3[3], e4[3]; + double x, y, d, v1[3], v2[3], v3[3], v4[3] = {0.0f, 0.0f, 0.0f}, e1[3], e2[3]; int ix, iy, res; /*ignore 2-edged faces*/ @@ -603,7 +603,7 @@ void BM_multires_smooth_bounds(BMesh *bm, BMFace *f) MDisps *mdp = CustomData_bmesh_get(&bm->ldata, l->prev->head.data, CD_MDISPS); MDisps *mdl = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MDISPS); MDisps *mdn = CustomData_bmesh_get(&bm->ldata, l->next->head.data, CD_MDISPS); - float co1[3], co2[3], co[3]; + float co1[3]; int sides; int y; diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c index 1ef6725350a..7bcca195cef 100644 --- a/source/blender/bmesh/intern/bmesh_mods.c +++ b/source/blender/bmesh/intern/bmesh_mods.c @@ -346,7 +346,7 @@ BMFace *BM_Split_Face(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **nl, */ void BM_Collapse_Vert(BMesh *bm, BMEdge *ke, BMVert *kv, float fac){ - BMFace **faces = NULL, **oldfaces=NULL, *f; + BMFace **faces = NULL, *f; BLI_array_staticdeclare(faces, 8); BMIter iter; BMLoop *l=NULL, *kvloop=NULL, *tvloop=NULL; diff --git a/source/blender/bmesh/operators/bevel.c b/source/blender/bmesh/operators/bevel.c index 1a10b3eb5ef..e3f72be01a6 100644 --- a/source/blender/bmesh/operators/bevel.c +++ b/source/blender/bmesh/operators/bevel.c @@ -443,7 +443,6 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op) for (i=0; i<BLI_array_count(faces); i++) { BMLoop *l; BMIter liter; - BMVert *lastv=NULL, *firstv=NULL; int j; /*create quad spans between split edges*/ @@ -498,7 +497,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op) if (v1 != v2 && v2 != v3 && v3 != v4) { BMIter liter2; BMLoop *l2, *l3; - BMEdge *e1, *e2, *e3, *e4; + BMEdge *e1, *e2; float d1, d2, *d3; f = BM_Make_QuadTri(bm, v4, v3, v2, v1, l->f, 1); diff --git a/source/blender/bmesh/operators/createops.c b/source/blender/bmesh/operators/createops.c index aa1c0397404..c5ba36d85c7 100644 --- a/source/blender/bmesh/operators/createops.c +++ b/source/blender/bmesh/operators/createops.c @@ -335,7 +335,7 @@ static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata) BMEdge *e; BMEdge **edges = NULL; BLI_array_staticdeclare(edges, 256); - BMVert *v, *lastv; + BMVert *v; /*BMVert **verts = NULL; */ /*BLI_array_staticdeclare(verts, 256);*/ /*UNUSED*/ int i; @@ -532,6 +532,7 @@ static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata) #if 0 /*create visualizing geometry*/ + BMVert *lastv; BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { BMVert *v2; BMFace *f; diff --git a/source/blender/bmesh/operators/triangulateop.c b/source/blender/bmesh/operators/triangulateop.c index 36c8fa40211..169ccce478a 100644 --- a/source/blender/bmesh/operators/triangulateop.c +++ b/source/blender/bmesh/operators/triangulateop.c @@ -82,7 +82,7 @@ void bmesh_beautify_fill_exec(BMesh *bm, BMOperator *op) stop = 1; BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) { - BMVert *v1, *v2, *v3, *v4, *d1, *d2; + BMVert *v1, *v2, *v3, *v4; float len1, len2, len3, len4, len5, len6, opp1, opp2, fac1, fac2; int ok; diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c index 17563d375f9..f54c7c4e012 100644 --- a/source/blender/editors/mesh/bmesh_tools.c +++ b/source/blender/editors/mesh/bmesh_tools.c @@ -4368,7 +4368,9 @@ static int mesh_vertices_randomize_exec(bContext *C, wmOperator *UNUSED(op)) { Object *obedit= CTX_data_edit_object(C); BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh; -#if 0 /*BMESH TODO*/ +#if 1 /*BMESH TODO*/ + (void)em; +#else hashvert_flag(em, SELECT); #endif return OPERATOR_FINISHED; diff --git a/source/blender/editors/mesh/knifetool.c b/source/blender/editors/mesh/knifetool.c index 68e1389008d..3b8ab2f748f 100755 --- a/source/blender/editors/mesh/knifetool.c +++ b/source/blender/editors/mesh/knifetool.c @@ -515,7 +515,7 @@ static int verge_linehit(const void *vlh1, const void *vlh2) static void knife_add_cut(knifetool_opdata *kcd) { - BMEditMesh *em = kcd->em; + /*BMEditMesh *em = kcd->em;*/ /*UNUSED*/ knifetool_opdata oldkcd = *kcd; if (kcd->linehits) { @@ -1041,7 +1041,6 @@ static int knife_sample_screen_density(knifetool_opdata *kcd, float radius) if (f && !is_space) { ListBase *lst; Ref *ref; - KnifeVert *curv = NULL; float dis; int c = 0; @@ -1383,7 +1382,8 @@ static void knifenet_fill_faces(knifetool_opdata *kcd) ListBase *face_nets = MEM_callocN(sizeof(ListBase)*bm->totface, "face_nets"); BMFace **faces = MEM_callocN(sizeof(BMFace*)*bm->totface, "faces knife"); MemArena *arena = BLI_memarena_new(1<<16, "knifenet_fill_faces"); - SmallHash shash, shash2, *hash = &shash, *visited = &shash2; + SmallHash shash, *hash = &shash; + /* SmallHash shash2, *visited = &shash2; */ /*UNUSED*/ int i, j, k=0, totface=bm->totface; BMO_push(bm, NULL); @@ -1512,8 +1512,6 @@ static void knifenet_fill_faces(knifetool_opdata *kcd) } for (j=0, entry=face_nets[i].first; entry; entry=entry->next, j++) { - EditEdge *eed; - lasteve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1); eve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2); diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index b50c526ef3d..eabba1965d9 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1032,7 +1032,15 @@ void ED_vgroup_mirror(Object *ob, int mirror_weights, int flip_vgroups) Mesh *me= ob->data; BMEditMesh *em = me->edit_btmesh; BMIter iter; -#if 0 //BMESH_TODO +#if 1 //BMESH_TODO + (void)eve; + (void)eve_mirr; + (void)dvert; + (void)dvert_mirr; + (void)flip_map; + (void)iter; + (void)em; +#else EM_cache_x_mirror_vert(ob, em); if(!CustomData_has_layer(&em->vdata, CD_MDEFORMVERT)) diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 4a6698046dd..281afa69744 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -399,8 +399,8 @@ static int material_slot_de_select(bContext *C, int select) return OPERATOR_CANCELLED; if(ob->type == OB_MESH) { - BMEditMesh *em= ((Mesh*)ob->data)->edit_btmesh; /*BMESH_TODO + BMEditMesh *em= ((Mesh*)ob->data)->edit_btmesh; if(em) { if(select) EM_select_by_material(em, ob->actcol-1); diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 4207d22a372..ad10c703b80 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -232,7 +232,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) BMesh *bm = em->bm; BMIter iter; void *userdata[2] = {em, NULL}; - int proptrans= 0; + /*int proptrans= 0; */ /*UNUSED*/ // transform now requires awareness for select mode, so we tag the f1 flags in verts tottrans= 0; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 238580a9bd6..8804b2d2cae 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5053,7 +5053,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t) else if (t->obedit) { if (t->obedit->type == OB_MESH) { - BMEditMesh *em = ((Mesh *)t->obedit->data)->edit_btmesh; + // BMEditMesh *em = ((Mesh *)t->obedit->data)->edit_btmesh; /* table needs to be created for each edit command, since vertices can move etc */ // BMESH_TODO mesh_octree_table(t->obedit, em, NULL, 'e'); } diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c index 7a661a94c04..6d524a59b40 100644 --- a/source/blender/editors/util/crazyspace.c +++ b/source/blender/editors/util/crazyspace.c @@ -143,9 +143,8 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped { BMVert *v; BMIter iter, liter; - BMEdge *e; BMLoop *l; - float *v1, *v2, *v3, *v4, *co1, *co2, *co3, *co4; + float *v1, *v2, *v3, *co1, *co2, *co3; int *vert_table = MEM_callocN(sizeof(int)*em->bm->totvert, "vert_table"); int index = 0; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 420254b0ba1..eb621fd6bf1 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -2491,7 +2491,6 @@ static int circle_select_exec(bContext *C, wmOperator *op) BMLoop *l; BMIter iter, liter; MLoopUV *luv; - MTexPoly *tface; int x, y, radius, width, height, select; float zoomx, zoomy, offset[2], ellipse[2]; int gesture_mode= RNA_int_get(op->ptr, "gesture_mode"); @@ -2940,7 +2939,6 @@ static int hide_exec(bContext *C, wmOperator *op) BMFace *efa; BMLoop *l; BMIter iter, liter; - MTexPoly *tf; MLoopUV *luv; int swap= RNA_boolean_get(op->ptr, "unselected"); int facemode= sima ? sima->flag & SI_SELACTFACE : 0; @@ -3031,13 +3029,12 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) SpaceImage *sima= CTX_wm_space_image(C); ToolSettings *ts= CTX_data_tool_settings(C); Object *obedit= CTX_data_edit_object(C); - Scene *scene = CTX_data_scene(C); + /*Scene *scene = CTX_data_scene(C);*/ /*UNUSED*/ BMEditMesh *em= ((Mesh*)obedit->data)->edit_btmesh; BMFace *efa; BMLoop *l; BMVert *v; BMIter iter, liter; - MTexPoly *tf; MLoopUV *luv; int facemode= sima ? sima->flag & SI_SELACTFACE : 0; int stickymode= sima ? (sima->sticky != SI_STICKY_DISABLE) : 1; diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 7a955eef66a..c9db202718a 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -816,7 +816,6 @@ static void uv_map_clip_correct(BMEditMesh *em, wmOperator *op) BMIter iter, liter; MLoopUV *luv; float dx, dy, min[2], max[2]; - int b, nverts; int correct_aspect= RNA_boolean_get(op->ptr, "correct_aspect"); int clip_to_bounds= RNA_boolean_get(op->ptr, "clip_to_bounds"); int scale_to_bounds= RNA_boolean_get(op->ptr, "scale_to_bounds"); @@ -902,7 +901,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); /* BMEditMesh *em= ((Mesh*)obedit->data)->edit_btmesh; */ /*UNUSED*/ - ParamHandle *handle; + /* ParamHandle *handle; */ /*UNUSED*/ int method = RNA_enum_get(op->ptr, "method"); int fill_holes = RNA_boolean_get(op->ptr, "fill_holes"); int correct_aspect = RNA_boolean_get(op->ptr, "correct_aspect"); diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c index 84cb8caec43..fbe1548eab1 100644 --- a/source/blender/modifiers/intern/MOD_build.c +++ b/source/blender/modifiers/intern/MOD_build.c @@ -89,7 +89,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, int numFaces, numEdges, numLoops; int *vertMap, *edgeMap, *faceMap; float frac; - MPoly *mpoly, *mpolys, *mpolyd; + MPoly *mpolys, *mpolyd; MLoop *mld, *mloops, *mls, *mloopd; GHashIterator *hashIter; /* maps vert indices in old mesh to indices in new mesh */ @@ -207,6 +207,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } } else { int numVerts = dm->getNumVerts(dm) * frac; + numLoops= 0; if(bmd->randomize) BLI_array_randomize(vertMap, sizeof(*vertMap), diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index 76075fbe61e..48420229328 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -340,7 +340,9 @@ DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd) CustomData_set_layer(&cddm->edgeData, CD_MEDGE, medge); free_membase(membase); - MEM_freeN(etags); + BLI_array_free(etags); + BLI_array_fake_user(mvert); + BLI_array_fake_user(medge); /*edge calculation isn't working correctly, so just brute force it*/ cddm->numEdgeData = 0; diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 12fb39ec8a6..3a9cc133b83 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -110,7 +110,7 @@ DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, MEdge *me; MLoop *ml; MPoly *mp; - float mtx[4][4], imtx[4][4]; + float mtx[4][4]; int i, j, *vtargetmap = NULL; BLI_array_declare(vtargetmap); int vector_size=0, a, b, totshape; diff --git a/source/blender/modifiers/intern/MOD_ngoninterp.c b/source/blender/modifiers/intern/MOD_ngoninterp.c index a5b0603436f..ac153fffd83 100644 --- a/source/blender/modifiers/intern/MOD_ngoninterp.c +++ b/source/blender/modifiers/intern/MOD_ngoninterp.c @@ -72,13 +72,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), int UNUSED(isFinalCalc)) { NgonInterpModifierData *nmd= (NgonInterpModifierData *)md; - DerivedMesh *dm= derivedData, *result= NULL; + DerivedMesh *dm= derivedData; DerivedMesh *cddm, *dummy; MFace *mf; MPoly *mpoly; MLoop *mloop; MFace *mface = NULL, *mf2; - MVert *mvert = NULL, *mv2, *omvert; + MVert *mvert = NULL, *omvert; BLI_array_declare(mface); BLI_array_declare(mvert); int *verts=NULL, *loops=NULL; @@ -181,8 +181,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), y++; continue; } else { - float co[3]; - int lindex[3] = {0, 1, 2}; + /*int lindex[3] = {0, 1, 2};*/ /*UNUSED*/ v1 = verts[x]; v2 = verts[x+1]; @@ -247,8 +246,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), edge will work.*/ mul_v3_fl(cent, 1.0/(float)(mp->totloop)); for (j=0; j<mp->totloop; j++) { - float vec[3]; - sub_v3_v3(cos[j], cent); mul_v3_fl(cos[j], 1.0+FLT_EPSILON*1500.0f); add_v3_v3(cos[j], cent); |