fix for bad NULL check in bmo_connect_pair, also remove duplicate checks in if statem...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 13 Jul 2013 16:25:47 +0000 (16:25 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 13 Jul 2013 16:25:47 +0000 (16:25 +0000)
source/blender/blenfont/intern/blf_font.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/tracking.c
source/blender/bmesh/operators/bmo_connect_pair.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/transform/transform_manipulator.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/render_texture.c

index 56a77d643d61e2f11e23f74d9ea4153b0451fe23..15098d505318ca2a55a2a46cce12df64d2bb2cbe 100644 (file)
@@ -87,7 +87,7 @@ void blf_font_size(FontBLF *font, unsigned int size, unsigned int dpi)
        err = FT_Set_Char_Size(font->face, 0, (FT_F26Dot6)(size * 64), dpi, dpi);
        if (err) {
                /* FIXME: here we can go through the fixed size and choice a close one */
-               printf("The current font don't support the size, %d and dpi, %d\n", size, dpi);
+               printf("The current font don't support the size, %u and dpi, %u\n", size, dpi);
                return;
        }
 
index 307dbc648473aff28e2a41b8c7a452bcd0892e41..8130f6e646cc693481e38174105c27fa79c811f0 100644 (file)
@@ -539,7 +539,7 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br,
        else if (mtex->brush_map_mode == MTEX_MAP_MODE_STENCIL) {
                float rotation = -mtex->rot;
                float point_2d[2] = {point[0], point[1]};
-               float x = 0.0f, y = 0.0f; /* Quite warnings */
+               float x, y;
                float co[3];
 
                x = point_2d[0] - br->stencil_pos[0];
@@ -658,7 +658,7 @@ float BKE_brush_sample_masktex(const Scene *scene, Brush *br,
        if (mtex->brush_map_mode == MTEX_MAP_MODE_STENCIL) {
                float rotation = -mtex->rot;
                float point_2d[2] = {point[0], point[1]};
-               float x = 0.0f, y = 0.0f; /* Quite warnings */
+               float x, y;
                float co[3];
 
                x = point_2d[0] - br->mask_stencil_pos[0];
index 0cd13d528d559fba45a2364f33da23aadd1ede93..c78038c0f6673a7acfd92628a1fb562eea0b4510 100644 (file)
@@ -2519,7 +2519,7 @@ static void distlimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
        
        /* only evaluate if there is a target */
        if (VALID_CONS_TARGET(ct)) {
-               float dvec[3], dist = 0.0f, sfac = 1.0f;
+               float dvec[3], dist, sfac = 1.0f;
                short clamp_surf = 0;
                
                /* calculate our current distance from the target */
index 8141fc8aaa189e6bc35ee117be66b864538d3039..2c561dd447264ae9a9a7a4e581493b1b9cacc1ee 100644 (file)
@@ -3455,7 +3455,7 @@ static bool check_point_in_stroke(bGPDstroke *stroke, float x, float y)
                prev = i;
        }
 
-       return count % 2 ? true : false;
+       return (count % 2) ? true : false;
 }
 
 /* Check whether point is inside any stroke of grease pencil layer. */
index a56cdeec629821391dd8cf09d0a48d976c2baaaa..872f1cea2c7a4ece0ff5cd67b1c8e28eaf3ff23e 100644 (file)
@@ -381,7 +381,7 @@ void bmo_connect_vert_pair_exec(BMesh *bm, BMOperator *op)
        pc.v_b = ((BMVert **)op_verts_slot->data.p)[1];
 
        /* fail! */
-       if (!(pc.v_a && pc.v_a)) {
+       if (!(pc.v_a && pc.v_b)) {
                return;
        }
 
index 6e294d15dabe4994b0b7d9ac9a8c9a3e23bd4888..63b44fb30d4870bda3abb16be188dac8162f43f0 100644 (file)
@@ -174,7 +174,6 @@ void EDBM_stats_update(BMEditMesh *em)
 DerivedMesh *EDBM_mesh_deform_dm_get(BMEditMesh *em)
 {
        return ((em->derivedFinal != NULL) &&
-               (em->derivedFinal) &&
                (em->derivedFinal->type == DM_TYPE_EDITBMESH) &&
                (em->derivedFinal->deformedOnly != false)) ? em->derivedFinal : NULL;
 }
index 5b777a1cda3d6e7096a9fd7e0a5d4f4f869205f3..fc61c94ff64cdb3b980ea1d409fe19305b750e89 100644 (file)
@@ -1682,7 +1682,7 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl
        rctf rect;
        GLuint buffer[64];      // max 4 items per select, so large enuf
        short hits;
-       extern void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); // XXX check a bit later on this... (ton)
+       extern void setwinmatrixview3d(ARegion *, View3D *, rctf *); // XXX check a bit later on this... (ton)
 
        /* when looking through a selected camera, the manipulator can be at the
         * exact same position as the view, skip so we don't break selection */
index e39efb98f6d7367fe6699f2a302d5ce800da8108..7d842c1026bc7c4c4c613801127c671170fdc702 100644 (file)
@@ -3478,9 +3478,14 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
                                ma= give_render_material(re, ob, a1+1);
                                
                                /* test for 100% transparent */
-                               ok= 1;
-                               if (ma->alpha==0.0f && ma->spectra==0.0f && ma->spectra==0.0f && ma->filter==0.0f && (ma->mode & MA_TRANSP) && (ma->mode & (MA_RAYTRANSP | MA_RAYMIRROR))==0 ) {
-                                       ok= 0;
+                               ok = 1;
+                               if ((ma->alpha == 0.0f) &&
+                                   (ma->spectra == 0.0f) &&
+                                   (ma->filter == 0.0f) &&
+                                   (ma->mode & MA_TRANSP) &&
+                                   (ma->mode & (MA_RAYTRANSP | MA_RAYMIRROR)) == 0)
+                               {
+                                       ok = 0;
                                        /* texture on transparency? */
                                        for (a=0; a<MAX_MTEX; a++) {
                                                if (ma->mtex[a] && ma->mtex[a]->tex) {
index a444588d627f2d1b9492e0063b0fe56a4a1ef2cd..ee722ee426c22a7fd9b4a7bd12fa749068740de4 100644 (file)
@@ -409,7 +409,7 @@ static int marble(Tex *tex, const float texvec[3], TexResult *texres)
 
 static int magic(Tex *tex, const float texvec[3], TexResult *texres)
 {
-       float x, y, z, turb=1.0;
+       float x, y, z, turb;
        int n;
 
        n= tex->noisedepth;