Silent a bunch of gcc warnings (usually dummy, but noisy!).
authorBastien Montagne <montagne29@wanadoo.fr>
Sun, 2 Dec 2012 16:01:06 +0000 (16:01 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Sun, 2 Dec 2012 16:01:06 +0000 (16:01 +0000)
16 files changed:
intern/audaspace/intern/AUD_LinearResampleReader.cpp
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/particle_system.c
source/blender/bmesh/operators/bmo_extrude.c
source/blender/bmesh/operators/bmo_symmetrize.c
source/blender/bmesh/operators/bmo_utils.c
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/bmesh/tools/bmesh_decimate_collapse.c
source/blender/collada/collada_utils.cpp
source/blender/compositor/nodes/COM_ScaleNode.cpp
source/blender/editors/interface/interface_templates.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/imbuf/intern/divers.c
source/blender/nodes/composite/nodes/node_composite_outputFile.c

index 6aa0fae..b342b8f 100644 (file)
@@ -81,7 +81,7 @@ void AUD_LinearResampleReader::read(int& length, bool& eos, sample_t* buffer)
        int samplesize = AUD_SAMPLE_SIZE(specs);
        int size = length;
        float factor = m_rate / m_reader->getSpecs().rate;
-       float spos;
+       float spos = 0.0f;
        sample_t low, high;
        eos = false;
 
index bb3836e..ed85e5b 100644 (file)
@@ -3366,7 +3366,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
                                                            (!hit_found || (brush->flags & MOD_DPAINT_INVERSE_PROX)))
                                                        {
                                                                float proxDist = -1.0f;
-                                                               float hitCo[3];
+                                                               float hitCo[3] = {0.0f, 0.0f, 0.0f};
                                                                short hQuad;
                                                                int face;
 
@@ -3723,6 +3723,8 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
                                        float smooth_range = smooth * (1.0f - strength), dist;
                                        /* calculate max range that can have particles with higher influence than the nearest one */
                                        float max_range = smooth - strength * smooth + solidradius;
+                                       /* Make gcc happy! */
+                                       dist = max_range;
 
                                        particles = BLI_kdtree_range_search(tree, max_range, bData->realCoord[bData->s_pos[index]].v, NULL, &nearest);
 
index 321a61c..d7b29a2 100644 (file)
@@ -189,7 +189,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
 #endif /* USE_TESSFACE_SPEEDUP */
 
                else {
-                       ScanFillVert *sf_vert, *sf_vert_last = NULL, *sf_vert_first = NULL;
+                       ScanFillVert *sf_vert = NULL, *sf_vert_last = NULL, *sf_vert_first = NULL;
                        /* ScanFillEdge *e; */ /* UNUSED */
                        ScanFillFace *sf_tri;
                        int totfilltri;
index a780a9e..90889d7 100644 (file)
@@ -2140,16 +2140,22 @@ static void psys_update_effectors(ParticleSimulationData *sim)
        precalc_guides(sim, sim->psys->effectors);
 }
 
-static void integrate_particle(ParticleSettings *part, ParticleData *pa, float dtime, float *external_acceleration, void (*force_func)(void *forcedata, ParticleKey *state, float *force, float *impulse), void *forcedata)
+static void integrate_particle(ParticleSettings *part, ParticleData *pa, float dtime, float *external_acceleration,
+                               void (*force_func)(void *forcedata, ParticleKey *state, float *force, float *impulse),
+                               void *forcedata)
 {
+#define ZERO_F43 {{0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}}
+
        ParticleKey states[5];
-       float force[3],acceleration[3],impulse[3],dx[4][3],dv[4][3],oldpos[3];
+       float force[3], acceleration[3], impulse[3], dx[4][3] = ZERO_F43, dv[4][3] = ZERO_F43, oldpos[3];
        float pa_mass= (part->flag & PART_SIZEMASS ? part->mass * pa->size : part->mass);
        int i, steps=1;
        int integrator = part->integrator;
 
+#undef ZERO_F43
+
        copy_v3_v3(oldpos, pa->state.co);
-       
+
        /* Verlet integration behaves strangely with moving emitters, so do first step with euler. */
        if (pa->prev_state.time < 0.f && integrator == PART_INT_VERLET)
                integrator = PART_INT_EULER;
index 065a1b5..45c937d 100644 (file)
@@ -55,8 +55,8 @@ void bmo_extrude_discrete_faces_exec(BMesh *bm, BMOperator *op)
        BMIter liter, liter2;
        BMFace *f, *f2, *f3;
        BMLoop *l, *l2, *l3, *l4, *l_tmp;
-       BMEdge **edges = NULL, *e, *laste;
-       BMVert *v, *lastv, *firstv;
+       BMEdge **edges = NULL, *e, *laste = NULL;
+       BMVert *v = NULL, *lastv, *firstv;
        BLI_array_declare(edges);
        int i;
 
index 248c726..ee0717d 100644 (file)
@@ -178,6 +178,7 @@ static void symm_split_asymmetric_edges(Symm *symm)
                                               plane_co[symm->axis][2],
                                               &lambda, TRUE);
                        BLI_assert(r);
+                       (void)r;
 
                        madd_v3_v3v3fl(co, e->v1->co, edge_dir, lambda);
                        co[symm->axis] = 0;
index 64dbf0c..34b2e96 100644 (file)
@@ -494,10 +494,10 @@ void bmo_rotate_uvs_exec(BMesh *bm, BMOperator *op)
        BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) {
                if (CustomData_has_layer(&(bm->ldata), CD_MLOOPUV)) {
                        if (use_ccw == FALSE) {  /* same loops direction */
-                               BMLoop *lf;     /* current face loops */
-                               MLoopUV *f_luv; /* first face loop uv */
-                               float p_uv[2];  /* previous uvs */
-                               float t_uv[2];  /* tmp uvs */
+                               BMLoop *lf;  /* current face loops */
+                               MLoopUV *f_luv = NULL;  /* first face loop uv */
+                               float p_uv[2] = {0.0f, 0.0f};  /* previous uvs */
+                               float t_uv[2];  /* tmp uvs */
 
                                int n = 0;
                                BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {
@@ -518,10 +518,10 @@ void bmo_rotate_uvs_exec(BMesh *bm, BMOperator *op)
                                copy_v2_v2(f_luv->uv, p_uv);
                        }
                        else { /* counter loop direction */
-                               BMLoop *lf;     /* current face loops */
-                               MLoopUV *p_luv; /* previous loop uv */
-                               MLoopUV *luv;
-                               float t_uv[2];  /* current uvs */
+                               BMLoop *lf;  /* current face loops */
+                               MLoopUV *p_luv;  /* previous loop uv */
+                               MLoopUV *luv = NULL;
+                               float t_uv[2] = {0.0f, 0.0f};  /* current uvs */
 
                                int n = 0;
                                BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {
@@ -599,10 +599,10 @@ void bmo_rotate_colors_exec(BMesh *bm, BMOperator *op)
        BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) {
                if (CustomData_has_layer(&(bm->ldata), CD_MLOOPCOL)) {
                        if (use_ccw == FALSE) {  /* same loops direction */
-                               BMLoop *lf;     /* current face loops */
-                               MLoopCol *f_lcol; /* first face loop color */
-                               MLoopCol p_col; /* previous color */
-                               MLoopCol t_col; /* tmp color */
+                               BMLoop *lf;  /* current face loops */
+                               MLoopCol *f_lcol = NULL;  /* first face loop color */
+                               MLoopCol p_col;  /* previous color */
+                               MLoopCol t_col;  /* tmp color */
 
                                int n = 0;
                                BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {
@@ -623,10 +623,10 @@ void bmo_rotate_colors_exec(BMesh *bm, BMOperator *op)
                                *f_lcol = p_col;
                        }
                        else {  /* counter loop direction */
-                               BMLoop *lf;     /* current face loops */
-                               MLoopCol *p_lcol; /* previous loop color */
-                               MLoopCol *lcol;
-                               MLoopCol t_col; /* current color */
+                               BMLoop *lf;  /* current face loops */
+                               MLoopCol *p_lcol;  /* previous loop color */
+                               MLoopCol *lcol = NULL;
+                               MLoopCol t_col;  /* current color */
 
                                int n = 0;
                                BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {
index 86509ac..b52525c 100644 (file)
@@ -381,6 +381,8 @@ static void offset_in_two_planes(EdgeHalf *e1, EdgeHalf *e2, EdgeHalf *emid,
        int iret;
 
        BLI_assert(f1 != NULL && f2 != NULL);
+       (void)f1;
+       (void)f2;
 
        /* get direction vectors for two offset lines */
        sub_v3_v3v3(dir1, v->co, BM_edge_other_vert(e1->e, v)->co);
@@ -879,6 +881,7 @@ static void bevel_build_rings(BMesh *bm, BevVert *bv)
        ns = vm->seg;
        ns2 = ns / 2;
        BLI_assert(n > 2 && ns > 1);
+       (void)n;
        /* Make initial rings, going between points on neighbors.
         * After this loop, will have coords for all (i, r, k) where
         * BoundVert for i has a bevel, 0 <= r <= ns2, 0 <= k <= ns */
index 7c054d8..35bf176 100644 (file)
@@ -703,6 +703,7 @@ static int bm_edge_collapse(BMesh *bm, BMEdge *e_clear, BMVert *v_clear, int r_e
                ok = BM_edge_loop_pair(e_clear, &l_a, &l_b);
 
                BLI_assert(ok == TRUE);
+               (void)ok;
                BLI_assert(l_a->f->len == 3);
                BLI_assert(l_b->f->len == 3);
 
index 35844b5..7bdda38 100644 (file)
@@ -139,7 +139,7 @@ Mesh *bc_to_mesh_apply_modifiers(Scene *scene, Object *ob, BC_export_mesh_type e
 {
        Mesh *tmpmesh;
        CustomDataMask mask = CD_MASK_MESH;
-       DerivedMesh *dm;
+       DerivedMesh *dm = NULL;
        switch (export_mesh_type) {
                case BC_MESH_TYPE_VIEW: {
                        dm = mesh_create_derived_view(scene, ob, mask);
@@ -151,7 +151,7 @@ Mesh *bc_to_mesh_apply_modifiers(Scene *scene, Object *ob, BC_export_mesh_type e
                }
        }
 
-       tmpmesh             = BKE_mesh_add("ColladaMesh"); // name is not important here
+       tmpmesh = BKE_mesh_add("ColladaMesh"); // name is not important here
        DM_to_mesh(dm, tmpmesh, ob);
        dm->release(dm);
        return tmpmesh;
index d535e71..6f7bd33 100644 (file)
@@ -39,7 +39,7 @@ void ScaleNode::convertToOperations(ExecutionSystem *graph, CompositorContext *c
        InputSocket *inputXSocket = this->getInputSocket(1);
        InputSocket *inputYSocket = this->getInputSocket(2);
        OutputSocket *outputSocket = this->getOutputSocket(0);
-       BaseScaleOperation *scaleoperation;
+       BaseScaleOperation *scaleoperation = NULL;
        bNode *bnode = this->getbNode();
 
        switch (bnode->custom1) {
index 61d14bf..e01e6bd 100644 (file)
@@ -2084,19 +2084,19 @@ void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propna
        PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
        uiBlock *block = uiLayoutGetBlock(layout);
        uiLayout *col, *row;
-       uiBut *but;
+       uiBut *but = NULL;
        float softmin, softmax, step, precision;
-       
+
        if (!prop) {
                RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
                return;
        }
 
        RNA_property_float_ui_range(ptr, prop, &softmin, &softmax, &step, &precision);
-       
+
        col = uiLayoutColumn(layout, TRUE);
        row = uiLayoutRow(col, TRUE);
-       
+
        switch (U.color_picker_type) {
                case USER_CP_CIRCLE:
                        but = uiDefButR_prop(block, HSVCIRCLE, 0, "", 0, 0, WHEEL_SIZE, WHEEL_SIZE, ptr, prop,
@@ -2115,7 +2115,6 @@ void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propna
                                             -1, 0.0, 0.0, UI_GRAD_HV, 0, "");
                        break;
        }
-       
 
        if (lock) {
                but->flag |= UI_BUT_COLOR_LOCK;
@@ -2133,7 +2132,6 @@ void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propna
 
        
        if (value_slider) {
-               
                switch (U.color_picker_type) {
                        case USER_CP_CIRCLE:
                                uiItemS(row);
@@ -2156,7 +2154,6 @@ void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propna
                                               -1, softmin, softmax, UI_GRAD_HV + 3, 0, "");
                                break;
                }
-               
        }
 }
 
index 51efa2b..9a5f32a 100644 (file)
@@ -2367,8 +2367,8 @@ static void createTransUVs(bContext *C, TransInfo *t)
        BMFace *efa;
        BMLoop *l;
        BMIter iter, liter;
-       UvElementMap *elementmap;
-       char *island_enabled;
+       UvElementMap *elementmap = NULL;
+       char *island_enabled = NULL;
        int count = 0, countsel = 0, count_rejected = 0;
        int propmode = t->flag & T_PROP_EDIT;
        int propconnected = t->flag & T_PROP_CONNECTED;
index 1eec06e..1f3f219 100644 (file)
@@ -232,7 +232,7 @@ static ParamHandle *construct_param_handle(Scene *scene, Object *ob, BMEditMesh
        BLI_srand(0);
        
        BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
-               ScanFillVert *sf_vert, *sf_vert_last, *sf_vert_first;
+               ScanFillVert *sf_vert = NULL, *sf_vert_last, *sf_vert_first;
                ScanFillFace *sf_tri;
                ParamKey key, vkeys[4];
                ParamBool pin[4], select[4];
index 8d289de..f049c40 100644 (file)
@@ -196,7 +196,7 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from,
 {
        float tmp[4];
        int x, y;
-       DitherContext *di;
+       DitherContext *di = NULL;
 
        /* we need valid profiles */
        BLI_assert(profile_to != IB_PROFILE_NONE);
index 656e2a7..214617c 100644 (file)
@@ -242,7 +242,7 @@ static void exec_output_file_singlelayer(RenderData *rd, bNode *node, bNodeStack
                        ImageFormatData *format = (sockdata->use_node_format ? &nimf->format : &sockdata->format);
                        char path[FILE_MAX];
                        char filename[FILE_MAX];
-                       CompBuf *cbuf;
+                       CompBuf *cbuf = NULL;
                        ImBuf *ibuf;
                        
                        switch (format->planes) {