Make compiler happy, remove doubtful non init usage.
authorGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Wed, 21 Oct 2009 17:56:26 +0000 (17:56 +0000)
committerGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Wed, 21 Oct 2009 17:56:26 +0000 (17:56 +0000)
14 files changed:
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/softbody.c
source/blender/editors/mesh/editmesh_loop.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/space_text/text_python.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform_snap.c
source/blender/gpu/intern/gpu_buffers.c
source/blender/nodes/intern/CMP_util.c
source/blender/nodes/intern/TEX_nodes/TEX_output.c
source/blender/python/generic/vector.c
source/blender/python/intern/bpy_rna.c
source/blender/render/intern/source/volume_precache.c

index 2ce877bd8472f8cd6812c401ef7edaf20e587ce6..c0391bb5406d7afeb6c261ef2e95444c939234c6 100644 (file)
@@ -1922,7 +1922,7 @@ void makeBevelList(Object *ob)
        BevPoint *bevp, *bevp2, *bevp1 = NULL, *bevp0;
        float min, inp, x1, x2, y1, y2;
        struct bevelsort *sortdata, *sd, *sd1;
-       int a, b, nr, poly, resolu, len=0;
+       int a, b, nr, poly, resolu = 0, len = 0;
        int do_tilt, do_radius;
        
        /* this function needs an object, because of tflag and upflag */
index 089f2a5ebfba388c6f9e20ffb3e41de6c4f225f5..a17b4b0be68118e8e5d1923e9a8baa0363ad3510 100644 (file)
@@ -1705,7 +1705,7 @@ 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], mindistedge = 1000.0f, 
+    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,
index 28103828dd482825f64fb1550922ae0449982c90..3dc9c81a2139544ad808c81f25ae1098616ad6e5 100644 (file)
@@ -207,7 +207,7 @@ void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts)
        EditEdge *nearest=NULL, *eed;
        float fac;
        int keys = 0, holdnum=0, selectmode, dist;
-       short mvalo[2] = {0,0}, mval[2];
+       short mvalo[2] = {0, 0}, mval[2] = {0, 0};
        short event=0, val, choosing=1, cancel=0, cuthalf = 0, smooth=0;
        short hasHidden = 0;
        char msg[128];
@@ -251,7 +251,7 @@ void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts)
 //                     }
 #endif
                }
-               else PIL_sleep_ms(10);  // idle         
+               else PIL_sleep_ms(10);  // idle
                
                
                while(qtest()) 
index 9875051e1ad15eab04435296a3aceb92b3ca4ffe..ee1a21db7e50b0847be01ff11b162cc37b4f5fb9 100644 (file)
@@ -2795,7 +2795,7 @@ static void brush_length(PEData *data, int point_index)
        PTCacheEdit *edit= data->edit;
        PTCacheEditPoint *point = edit->points + point_index;
        KEY_K;
-       float dvec[3],pvec[3];
+       float dvec[3],pvec[3] = {0.0f, 0.0f, 0.0f};
 
        LOOP_KEYS {
                if(k==0) {
@@ -2819,7 +2819,7 @@ static void brush_puff(PEData *data, int point_index)
        PTCacheEditPoint *point = edit->points + point_index;
        KEY_K;
        float mat[4][4], imat[4][4];
-       float lastco[3], rootco[3], co[3], nor[3], kco[3], dco[3], fac=0.0f, length=0.0f;
+       float lastco[3], rootco[3] = {0.0f, 0.0f, 0.0f}, co[3], nor[3], kco[3], dco[3], fac=0.0f, length=0.0f;
 
        if(psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
                psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, psys->particles + point_index, mat);
index 5dd69cdf03055993b6371b447868b802efd753a9..4f38e1e0c845fad7fdf8814729f4e4ed96706425 100644 (file)
@@ -860,7 +860,7 @@ void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode)
        Object *ob= OBACT;
        Mesh *me= get_mesh(ob);
        int index;
-       short mval[2], sco[2];
+       short mval[2] = {0, 0}, sco[2];
 
        if (!me) return;
        
index 4400747a7315af6214b01d59c6f6889efbde5959..92a647202108438a31b9651c8270f222da6cf62e 100644 (file)
@@ -50,7 +50,7 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
        TextLine *tmp;
        int l, x, y, w, h, i;
        int tgti, *top;
-       short mval[2];
+       short mval[2] = {0, 0};
        
        if(!st || !st->text) return 0;
        if(!texttool_text_is_active(st->text)) return 0;
index 921ee2deaa4fe771f3a7850625ab6926edf57af9..51f257da4324b3c9498b5b7c704778cbb273718d 100644 (file)
@@ -94,7 +94,7 @@ static void view3d_boxview_clip(ScrArea *sa)
        ARegion *ar;
        BoundBox *bb = MEM_callocN(sizeof(BoundBox), "clipbb");
        float clip[6][4];
-       float x1= 0.0f, y1= 0.0f, z1= 0.0f, ofs[3];
+       float x1= 0.0f, y1= 0.0f, z1= 0.0f, ofs[3] = {0.0f, 0.0f, 0.0f};
        int val;
 
        /* create bounding box */
index 37cd94c21c52dc0a8b71c726239abb44edd0a969..1d26649fea2c6ef1eea757cf9019ecca782396f9 100644 (file)
@@ -633,7 +633,7 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
                        DepthPeel *p1, *p2;
                        float *last_p = NULL;
                        float dist = FLT_MAX;
-                       float p[3];
+                       float p[3] = {0.0f, 0.0f, 0.0f};
                        
                        depth_peels.first = depth_peels.last = NULL;
                        
index 2563f7977cca39a193fc3d650f3b808488cc8ae7..9e164f46e4c5938ee0021fa923b6b6f3808c7b1e 100644 (file)
@@ -1168,7 +1168,7 @@ void GPU_color4_upload( DerivedMesh *dm, unsigned char *data )
 void GPU_color_switch( int mode )
 {
        if( mode ) {
-               if( !GLStates & GPU_BUFFER_COLOR_STATE )
+               if( !(GLStates & GPU_BUFFER_COLOR_STATE) )
                        glEnableClientState( GL_COLOR_ARRAY );
                GLStates |= GPU_BUFFER_COLOR_STATE;
        }
index 175a0a54371c937e718040b38ece6fa2dc45353c..eb32436bf2c3b4bf942eaec022c44a14e29c9eb6 100644 (file)
@@ -1255,7 +1255,7 @@ CompBuf* qd_downScaledCopy(CompBuf* src, int scale)
                fbuf = alloc_compbuf(nw, nh, src->type, 1);
                {
                        int x, y, xx, yy, sx, sy, mx, my;
-                       float colsum[4];
+                       float colsum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
                        float fscale = 1.f/(float)(scale*scale);
                        for (y=0; y<nh; y++) {
                                fRGB* fcolp = (fRGB*)&fbuf->rect[y*fbuf->x*fbuf->type];
index 580b4cde8bf7d44f21336e6da049d1ad4294bfdf..ab8920e67ad6b7fd6bd0c8c039fe44d1ff8481b7 100644 (file)
@@ -118,7 +118,7 @@ static void unique_name(bNode *node)
 {
        TexNodeOutput *tno = (TexNodeOutput *)node->storage;
        char *new_name = 0;
-       int new_len;
+       int new_len = 0;
        int suffix;
        bNode *i;
        char *name = tno->name;
index 605f45be128ecb79c4774610b765a6aa7f1bd1b0..0ce7b83e653b9e6e2c61cb7a13e768a6754d51b7 100644 (file)
@@ -1271,7 +1271,7 @@ static PyObject *Vector_getSwizzle(VectorObject * self, void *closure)
    unchanged. */
 static int Vector_setSwizzle(VectorObject * self, PyObject * value, void *closure)
 {
-       VectorObject *vecVal;
+       VectorObject *vecVal = NULL;
        PyObject *item;
        size_t listLen;
        float scalarVal;
index fb83ae3f20522dbec904bc8e21ab89db836ffea1..a60de529e8f317dca59b8551607eeb8b778cb607 100644 (file)
@@ -1590,7 +1590,7 @@ static int foreach_compat_buffer(RawPropertyType raw_type, int attr_signed, cons
 
 static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set)
 {
-       PyObject *item;
+       PyObject *item = NULL;
        int i=0, ok, buffer_is_compat;
        void *array= NULL;
 
@@ -2677,7 +2677,7 @@ PyObject *BPY_rna_props( void )
 
 static StructRNA *pyrna_struct_as_srna(PyObject *self)
 {
-       BPy_StructRNA *py_srna;
+       BPy_StructRNA *py_srna = NULL;
        StructRNA *srna;
        
        /* ack, PyObject_GetAttrString wont look up this types tp_dict first :/ */
index 62d7343036ac0a7b3d0c7cfe7969016963698cfe..25645d9cce2a95ff4369c928270239f62b069297 100644 (file)
@@ -594,7 +594,7 @@ void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Mat
        ShadeInput shi;
        ListBase threads;
        float *bbmin=obi->obr->boundbox[0], *bbmax=obi->obr->boundbox[1];
-       int parts[3], totparts;
+       int parts[3] = {1, 1, 1}, totparts;
        
        int caching=1, counter=0;
        int totthread = re->r.threads;