harmless changes to quiet clang static check warnings.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 24 Apr 2011 10:51:45 +0000 (10:51 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 24 Apr 2011 10:51:45 +0000 (10:51 +0000)
- made EXPANDED_AGRP take bAnimContext as an argument.
- remove unneeded NULL check drawFacesColored functions.
- comment some vars which are set but not used.

12 files changed:
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/curve/editcurve.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/space_node/drawnode.c
source/blender/imbuf/intern/scaling.c
source/blender/render/intern/source/shadeoutput.c
source/gameengine/Ketsji/KX_Scene.cpp

index 0b29b29e60ff99840753aa609b3423e693459b7c..ee9d49639734f62f1c9fa9c15e9b499edae4b3a4 100644 (file)
@@ -580,8 +580,9 @@ static void cdDM_drawFacesColored(DerivedMesh *dm, int useTwoSided, unsigned cha
        /* there's a conflict here... twosided colors versus culling...? */
        /* defined by history, only texture faces have culling option */
        /* we need that as mesh option builtin, next to double sided lighting */
-       if(col1 && col2)
+       if(col2) {
                glEnable(GL_CULL_FACE);
+       }
 
        cdDM_update_normals_from_pbvh(dm);
 
index b9bf10bdf3922f829a2da28382bfe4b93a1a9477..33094313acd0fea8959496b87985244b445fdfe9 100644 (file)
@@ -1541,8 +1541,10 @@ static void ccgDM_drawFacesColored(DerivedMesh *dm, int UNUSED(useTwoSided), uns
        }
 
        glShadeModel(GL_SMOOTH);
-       if(col1 && col2)
+
+       if(col2) {
                glEnable(GL_CULL_FACE);
+       }
 
        glBegin(GL_QUADS);
        for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
index db07fae92454154ecd209fe21f3afec5d6804f6a..ba5d4282416c2cd4153d23fd1d4899a6b7e5e3d0 100644 (file)
@@ -2068,6 +2068,7 @@ void txt_do_redo(Text *text)
                        linep= linep+(text->undo_buf[text->undo_pos]<<8); text->undo_pos++;
                        linep= linep+(text->undo_buf[text->undo_pos]<<16); text->undo_pos++;
                        linep= linep+(text->undo_buf[text->undo_pos]<<24); text->undo_pos++;
+                       (void)linep;
 
                        break;
                case UNDO_INDENT:
index 3374b3c6f95e10852165c46c9443b6aec1071132..51fde09b0744cc2df920272174bd454da7360ef1 100644 (file)
@@ -3275,6 +3275,7 @@ void ANIM_channel_draw_widgets (bAnimContext *ac, bAnimListElem *ale, uiBlock *b
                        draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_SOLO);
                        offset += ICON_WIDTH; 
                }
+               (void)offset;
        }
        
        /* step 4) draw text... */
index 0845014c99e2c0afa625e0757336c2235004f142..4edcca469352c8d88704e29d50e276f3f0547f77 100644 (file)
@@ -169,9 +169,9 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
                        case ANIMTYPE_DSLAT:
                        {
                                /* need to verify that this data is valid for now */
-                               // XXX: ale may be null!
-                               if (ale->adt)
+                               if (ale && ale->adt) {
                                        ale->adt->flag |= ADT_UI_ACTIVE;
+                               }
                        }
                                break;
                }
@@ -1001,7 +1001,7 @@ static void rearrange_action_channels (bAnimContext *ac, bAction *act, short mod
                
                for (agrp= act->groups.first; agrp; agrp= agrp->next) {
                        /* only consider F-Curves if they're visible (group expanded) */
-                       if (EXPANDED_AGRP(agrp)) {
+                       if (EXPANDED_AGRP(ac, agrp)) {
                                rearrange_animchannel_islands(&agrp->channels, rearrange_func, mode, ANIMTYPE_FCURVE);
                        }
                }
index cca4fdbe331c547bdb296ac5b19c9ede757c09fa..71893cee89aaee148ac8d33b54cd935fe49a9aaa 100644 (file)
@@ -1017,7 +1017,7 @@ static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeS
                 * but the group isn't expanded...
                 */
                if ( (filter_mode & (ANIMFILTER_SEL|ANIMFILTER_UNSEL)) &&       /* care about selection status */
-                        (EXPANDED_AGRP(agrp)==0) )                                                             /* group isn't expanded */
+                        (EXPANDED_AGRP(ac, agrp)==0) )                                                         /* group isn't expanded */
                {
                        /* if the group itself isn't selected appropriately, we shouldn't consider it's children either */
                        if (ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) == 0)
@@ -1076,7 +1076,7 @@ static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeS
                                 *      - group is expanded
                                 *      - we just need the F-Curves present
                                 */
-                               if ( (!(filter_mode & ANIMFILTER_VISIBLE) || EXPANDED_AGRP(agrp)) || (filter_mode & ANIMFILTER_CURVESONLY) ) 
+                               if ( (!(filter_mode & ANIMFILTER_VISIBLE) || EXPANDED_AGRP(ac, agrp)) || (filter_mode & ANIMFILTER_CURVESONLY) )
                                {
                                        /* for the Graph Editor, curves may be set to not be visible in the view to lessen clutter,
                                         * but to do this, we need to check that the group doesn't have it's not-visible flag set preventing 
index 1ab7acef8618b49e7211e6ecd2a25d548b38abd7..9bae4ea6569f4c09119ee4d5fef03b0f00baccfd 100644 (file)
@@ -951,7 +951,7 @@ static void calc_shapeKeys(Object *obedit)
                                                                                ++i;
                                                                        }
 
-                                                                       fp+= 3; curofp+= 3;     /* alphas */
+                                                                       fp+= 3; /* alphas */
                                                                } else {
                                                                        for (j= 0; j < 3; ++j, ++i) {
                                                                                VECCOPY(fp, bezt->vec[j]);
@@ -5662,7 +5662,7 @@ static int delete_exec(bContext *C, wmOperator *op)
        Curve *cu= obedit->data;
        EditNurb *editnurb= cu->editnurb;
        ListBase *nubase= &editnurb->nurbs;
-       Nurb *nu, *next, *nu1;
+       Nurb *nu, *nu1;
        BezTriple *bezt, *bezt1, *bezt2;
        BPoint *bp, *bp1, *bp2;
        int a, cut= 0, type= RNA_enum_get(op->ptr, "type");
@@ -5687,6 +5687,7 @@ static int delete_exec(bContext *C, wmOperator *op)
 
        if(type==0) {
                /* first loop, can we remove entire pieces? */
+               Nurb *next;
                nu= nubase->first;
                while(nu) {
                        next= nu->next;
@@ -5815,7 +5816,6 @@ static int delete_exec(bContext *C, wmOperator *op)
                nu1= NULL;
                nuindex= 0;
                for(nu= nubase->first; nu; nu= nu->next) {
-                       next= nu->next;
                        if(nu->type == CU_BEZIER) {
                                bezt= nu->bezt;
                                for(a=0; a<nu->pntsu-1; a++) {
index 1ca33e7365619cebc7ae986ea64146e88305df4a..5ecbaeb1c87c6058c328a20ca9629b3fa9b64333 100644 (file)
@@ -251,7 +251,7 @@ typedef enum eAnimFilter_Flags {
 /* Actions (also used for Dopesheet) */
        /* Action Channel Group */
 #define EDITABLE_AGRP(agrp) ((agrp->flag & AGRP_PROTECTED)==0)
-#define EXPANDED_AGRP(agrp) \
+#define EXPANDED_AGRP(ac, agrp) \
        ( ( ((ac)->spacetype == SPACE_IPO) && (agrp->flag & AGRP_EXPANDED_G) ) || \
          ( ((ac)->spacetype != SPACE_IPO) && (agrp->flag & AGRP_EXPANDED)   ) )
 #define SEL_AGRP(agrp) ((agrp->flag & AGRP_SELECTED) || (agrp->flag & AGRP_ACTIVE))
index 68b9170b8371316334255cce44cb32e2174141a5..7d92c308f17b36351f28f900117104da85d6b15b 100644 (file)
@@ -1643,6 +1643,8 @@ void draw_nodespace_color_info(ARegion *ar, int color_manage, int channels, int
                BLF_draw_ascii(blf_mono_font, str, sizeof(str));
                dx += BLF_width(blf_mono_font, str);
        }
+
+       (void)dx;
 }
 
 #if 0
index 9bc4ba6776cc0e59f409b705e3981233d83f36ed..f6a6a6449772f37ae09f9811a5c7277acc3a8d4b 100644 (file)
@@ -952,6 +952,7 @@ static struct ImBuf *scaledownx(struct ImBuf *ibuf, int newx)
                ibuf->mall |= IB_rectfloat;
                ibuf->rect_float = _newrectf;
        }
+       (void)rect_size; /* UNUSED in release builds */
        
        ibuf->x = newx;
        return(ibuf);
@@ -1082,6 +1083,7 @@ static struct ImBuf *scaledowny(struct ImBuf *ibuf, int newy)
                ibuf->mall |= IB_rectfloat;
                ibuf->rect_float = (float *) _newrectf;
        }
+       (void)rect_size; /* UNUSED in release builds */
        
        ibuf->y = newy;
        return(ibuf);
index 768f1425c6ff60e7c8c96629f88416ca15b941f4..97c6c5620287c7dcdba2ab50b5ad1e011312ac75 100644 (file)
@@ -726,7 +726,7 @@ static float Toon_Diff( float *n, float *l, float *v, float size, float smooth )
 /* in latter case, only last multiplication uses 'nl' */
 static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough )
 {
-       float i, nh, nv, vh, realnl, h[3];
+       float i/*, nh*/, nv, vh, realnl, h[3];
        float a, b, t, A, B;
        float Lit_A, View_A, Lit_B[3], View_B[3];
        
@@ -735,8 +735,8 @@ static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough
        h[2]= v[2]+l[2];
        normalize_v3(h);
        
-       nh= n[0]*h[0]+n[1]*h[1]+n[2]*h[2]; /* Dot product between surface normal and half-way vector */
-       if(nh<0.0f) nh = 0.0f;
+       /* nh= n[0]*h[0]+n[1]*h[1]+n[2]*h[2]; */ /* Dot product between surface normal and half-way vector */
+       /* if(nh<0.0f) nh = 0.0f; */
        
        nv= n[0]*v[0]+n[1]*v[1]+n[2]*v[2]; /* Dot product between surface normal and view vector */
        if(nv<=0.0f) nv= 0.0f;
index 4a379f46440ff951e1cb5d05bf65c064a9d3a596..080765c78468779ba41d9c812f3edc59a2405a75 100644 (file)
@@ -1514,7 +1514,7 @@ void KX_Scene::LogicUpdateFrame(double curtime, bool frame)
 void KX_Scene::LogicEndFrame()
 {
        m_logicmgr->EndFrame();
-       int numobj = m_euthanasyobjects->GetCount();
+       int numobj;
 
        KX_GameObject* obj;