diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-24 14:51:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-24 14:51:45 +0400 |
commit | 8fdebf24f4fe405c77f13a72c45cf0f8e6bc1f3f (patch) | |
tree | e2b7d4d9f40b8f93afe15d25ef092b2242282637 /source/blender/editors | |
parent | 5c4743b9ee2e98fc9ba8738fefddd7698034752d (diff) |
harmless changes to quiet clang static check warnings.
- made EXPANDED_AGRP take bAnimContext as an argument.
- remove unneeded NULL check drawFacesColored functions.
- comment some vars which are set but not used.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 1 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 4 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 2 |
6 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 3374b3c6f95..51fde09b074 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -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... */ diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 0845014c99e..4edcca46935 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -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); } } diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index cca4fdbe331..71893cee89a 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -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 diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 1ab7acef861..9bae4ea6569 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -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++) { diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 1ca33e73656..5ecbaeb1c87 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -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)) diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 68b9170b837..7d92c308f17 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -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 |