Commented and tagged some unused vars, added some var init (gcc warnings...)
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 28 Sep 2011 15:22:13 +0000 (15:22 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 28 Sep 2011 15:22:13 +0000 (15:22 +0000)
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/intern/anim_movie.c
source/blender/modifiers/intern/MOD_explode.c

index 3a86389dba712888fb58e1a23668844682c6ee6d..1ec573c853a5e81b06562bb15d33023e88ba5207 100644 (file)
@@ -741,7 +741,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
        MDeformVert *dvert = NULL;
        Cloth *clothObj = NULL;
        int numverts;
-       float goalfac = 0;
+       /* float goalfac = 0; */ /* UNUSED */
        ClothVertex *verts = NULL;
 
        if (!clmd || !dm) return;
@@ -764,7 +764,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
                                        if (( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_mass-1)) && (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ))
                                        {
                                                verts->goal = dvert->dw [j].weight;
-                                               goalfac= 1.0f;
+                                               /* goalfac= 1.0f; */ /* UNUSED */
                                                
                                                /*
                                                // Kicking goal factor to simplify things...who uses that anyway?
index 32d78a4d306be3a21aed249955691bafd5444493..26ee62e035b654f56a6acf92c91ece2d76705b72 100644 (file)
@@ -2364,7 +2364,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
 {
        Cloth *cloth= clmd->clothObject;
        BVHTree *cloth_bvh= cloth->bvhtree;
-       unsigned int i=0, numfaces = 0, numverts = 0, k, l, j;
+       unsigned int i=0, /* numfaces = 0, */ /* UNUSED */ numverts = 0, k, l, j;
        int rounds = 0; // result counts applied collisions; ic is for debug output;
        ClothVertex *verts = NULL;
        int ret = 0, ret2 = 0;
@@ -2375,7 +2375,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
                return 0;
        
        verts = cloth->verts;
-       numfaces = cloth->numfaces;
+       /* numfaces = cloth->numfaces; */ /* UNUSED */
        numverts = cloth->numverts;
 
        ////////////////////////////////////////////////////////////
@@ -2477,7 +2477,7 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
                                // collisions = 1;
                                verts = cloth->verts; // needed for openMP
        
-                               numfaces = cloth->numfaces;
+                               /* numfaces = cloth->numfaces; */ /* UNUSED */
                                numverts = cloth->numverts;
        
                                verts = cloth->verts;
index bd5935c893c7b461e619c3ce873c69039a371537..f55d67fed416530324ec8d07a66558d18e74686d 100644 (file)
@@ -344,15 +344,19 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
  *        keep expander channels with no sub-data out, as those cases should get
  *        dealt with by the recursive detection idiom in place.
  */
+/* XXX Commented most of that macro, since it seems that _doSubChannels var is never used...
+ *     mont29.
+ */
 #define BEGIN_ANIMFILTER_SUBCHANNELS(expanded_check) \
        { \
                int _filter = filter_mode; \
-               short _doSubChannels = 0; \
-               if (!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check)) \
-                       _doSubChannels=1; \
-               else if (!(filter_mode & ANIMFILTER_LIST_CHANNELS)) \
-                       _doSubChannels=2; \
-               else {\
+/*             short _doSubChannels = 0; \*/ \
+/*             if (!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check)) \*/ \
+/*                     _doSubChannels=1; \*/ \
+/*             else if (!(filter_mode & ANIMFILTER_LIST_CHANNELS)) \*/ \
+/*                     _doSubChannels=2; \*/ \
+/*             else {\*/ \
+               if (!(!(filter_mode & ANIMFILTER_LIST_VISIBLE) || (expanded_check) || !(filter_mode & ANIMFILTER_LIST_CHANNELS))) { \
                        filter_mode |= ANIMFILTER_TMP_PEEK; \
                }
                /* ... standard sub-channel filtering can go on here now ... */
index f1c1e21758de6f3806800c35e2f259c8e576bbc2..232c112ee21efc8fcd61151e2409c1c946f403f1 100644 (file)
@@ -889,11 +889,13 @@ void SEQUENCER_OT_select_border(wmOperatorType *ot)
 static EnumPropertyItem sequencer_prop_select_grouped_types[] = {
        {1, "TYPE", 0, "Type", "Shared strip type"},
        {2, "TYPE_BASIC", 0, "Global Type", "All strips of same basic type (Graphical or Sound)"},
-       {3, "TYPE_EFFECT", 0, "Effect Type", "Shared strip effect type (if active strip is not an effect one, select all non-effect strips)"},
+       {3, "TYPE_EFFECT", 0, "Effect Type",
+           "Shared strip effect type (if active strip is not an effect one, select all non-effect strips)"},
        {4, "DATA", 0, "Data", "Shared data (scene, image, sound, etc.)"},
        {5, "EFFECT", 0, "Effect", "Shared effects"},
-       {6, "EFFECT_LINK", 0, "Effect/Linked", "Other strips affected by the active one (sharing some time, and below or effect-assigned)"},
-    {7, "OVERLAP", 0, "Overlap", "Overlapping time"},
+       {6, "EFFECT_LINK", 0, "Effect/Linked",
+           "Other strips affected by the active one (sharing some time, and below or effect-assigned)"},
+       {7, "OVERLAP", 0, "Overlap", "Overlapping time"},
        {0, NULL, 0, NULL, NULL}
 };
 
@@ -1033,7 +1035,7 @@ static short select_grouped_time_overlap(Editing *ed, Sequence *actseq)
 
 static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
 {
-       Sequence *seq;
+       Sequence *seq = NULL;
        short changed = FALSE;
        short is_audio = ((actseq->type == SEQ_META) || SEQ_IS_SOUND(actseq));
        int startdisp = actseq->startdisp;
index c3cbcb61622ad4519e8b9613b9e6249468882f6b..f435b507a2a57e4b3777326189a417e07f86d17a 100644 (file)
@@ -903,7 +903,7 @@ static void do_material_tex(GPUShadeInput *shi)
        /*char *lastuvname = NULL;*/ /*UNUSED*/
        float one = 1.0f, norfac, ofs[3];
        int tex_nr, rgbnor, talpha;
-       int init_done = 0, iBumpSpacePrev;
+       int init_done = 0, iBumpSpacePrev = 0; /* Not necessary, quiting gcc warning. */
        GPUNodeLink *vNorg, *vNacc, *fPrevMagnitude;
        int iFirstTimeNMap=1;
        int found_deriv_map = 0;
index 3c3cecc0e963dbdc351e0e2f8db60b1d6dbbe64b..b9500c2f79840a802e3aa356eb54e2f10aaf58e1 100644 (file)
@@ -900,8 +900,8 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
        long long st_time; 
        struct anim_index * tc_index = 0;
        AVStream * v_st;
-       int new_frame_index;
-       int old_frame_index;
+       int new_frame_index = 0; /* To quite gcc barking... */
+       int old_frame_index = 0; /* To quite gcc barking... */
 
        if (anim == 0) return (0);
 
index cbf079bccefb215c4752acb6c2ae8a11afecc75d..0f3822f8cb6b020237503c7061b03d9488fd0761 100644 (file)
@@ -558,7 +558,9 @@ static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
        int *vertpa = MEM_callocN(sizeof(int)*totvert,"explode_vertpa2");
        int *facepa = emd->facepa;
        int *fs, totesplit=0,totfsplit=0,curdupface=0;
-       int i,j,v1,v2,v3,v4,esplit, v[4], uv[4];
+       int i,j,v1,v2,v3,v4,esplit,
+           v[4]  = {0, 0, 0, 0}, /* To quite gcc barking... */
+           uv[4] = {0, 0, 0, 0}; /* To quite gcc barking... */
        int numlayer;
 
        edgehash= BLI_edgehash_new();