Quite some compiler warnings...
authorBastien Montagne <montagne29@wanadoo.fr>
Sat, 17 Dec 2011 16:22:08 +0000 (16:22 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Sat, 17 Dec 2011 16:22:08 +0000 (16:22 +0000)
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/tracking.c
source/blender/editors/object/object_vgroup.c

index d4d83fec0eb2e92934be5f5470867acf516c5f76..2cf2225607ecceb512590d58879cbfe4fdc328bc 100644 (file)
@@ -657,7 +657,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
        float *nors= dm->getFaceDataArray(dm, CD_NORMAL);
        MTFace *tf = DM_get_face_data_layer(dm, CD_MTFACE);
        int i, j, orig, *index = DM_get_face_data_layer(dm, CD_ORIGINDEX);
-       int startFace = 0, lastFlag = 0xdeadbeef;
+       int startFace = 0 /*, lastFlag = 0xdeadbeef */ /* UNUSED */;
        MCol *mcol = dm->getFaceDataArray(dm, CD_WEIGHT_MCOL);
        if(!mcol)
                mcol = dm->getFaceDataArray(dm, CD_MCOL);
@@ -776,7 +776,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
                        int next_actualFace= dm->drawObject->triangle_to_mface[0];
 
                        glShadeModel( GL_SMOOTH );
-                       lastFlag = 0;
+                       /* lastFlag = 0; */ /* UNUSED */
                        for(i = 0; i < tottri; i++) {
                                int actualFace = next_actualFace;
                                int flag = 1;
index f7f10276ee49b8eab9072a9998a590b9b8375cd0..6fb4164d6c6efd87383e1c467ecffb0ab360560e 100644 (file)
@@ -213,7 +213,7 @@ void defvert_normalize_lock(MDeformVert *dvert, const int def_nr_lock)
                dvert->dw[0].weight= 1.0f;
        }
        else {
-               MDeformWeight *dw_lock;
+               MDeformWeight *dw_lock = NULL;
                MDeformWeight *dw;
                unsigned int i;
                float tot_weight= 0.0f;
index b592e078db333e8fc5261c9cd0d6ea8c4da1a1a7..955e747eded06708542cff9bca30f8ce207dac95 100644 (file)
@@ -3220,7 +3220,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
                                                /* hit data     */
                                                float hitCoord[3];
                                                int hitFace = -1;
-                                               short hitQuad;
+                                               short hitQuad = 0;
 
                                                /* Supersampling factor */
                                                if (samples > 1 && surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ)
@@ -4647,7 +4647,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc
        #pragma omp parallel for schedule(static)
        for (index=0; index<sData->total_points; index++)
        {
-               float prev_point[3];
+               float prev_point[3] = {0.0f, 0.0f, 0.0f};
                if (do_velocity_data && !new_bdata) {
                        copy_v3_v3(prev_point, bData->realCoord[bData->s_pos[index]].v);
                }
index 828ecb2d53521598bc2d4d5740175dfa88b64dd1..83adfa1223634500e5a5e71da3fdfb9065b0cf24 100644 (file)
@@ -1154,7 +1154,7 @@ int BKE_tracking_next(MovieTrackingContext *context)
 
        #pragma omp parallel for private(a) shared(ibuf_new, ok) if(map_size>1)
        for(a= 0; a<map_size; a++) {
-               TrackContext *track_context;
+               TrackContext *track_context = NULL;
                MovieTrackingTrack *track;
                MovieTrackingMarker *marker;
 
index e117a934cd78af4bf238918b640035898001b306..bfb5d166e6f5339521a2078a5066a8667c561fac 100644 (file)
@@ -892,7 +892,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
        int totweight = dvert->totweight;
        float oldw = 0;
        float oldPos[3] = {0};
-       float vc, hc, dist;
+       float vc, hc, dist = 0.0f;
        int i, k;
        float (*changes)[2] = MEM_mallocN(sizeof(float *)*totweight*2, "vertHorzChange");
        float *dists = MEM_mallocN(sizeof(float)*totweight, "distance");