From d6d2f09dd9e4df0a3e1168b2fbd3dcf2f9bd8e27 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 23 Apr 2011 12:57:03 +0000 Subject: quiet some clang warnings & fix for bugs in exceptional cases. - ghost C api, BLI_get_folder_version() could assign garbage values. - pointcache ptcache_find_frames_around() had a superfluous NULL check which would have crashed anyway if actually NULL. --- source/blender/editors/animation/anim_channels_defines.c | 4 ++-- source/blender/editors/interface/interface.c | 2 ++ source/blender/editors/interface/interface_regions.c | 1 + source/blender/editors/space_image/image_draw.c | 2 ++ source/blender/editors/space_view3d/view3d_header.c | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 383e35a5760..3374b3c6f95 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -3224,7 +3224,7 @@ void ANIM_channel_draw_widgets (bAnimContext *ac, bAnimListElem *ale, uiBlock *b { bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale); View2D *v2d= &ac->ar->v2d; - float y, ymid, ytext; + float y, ymid /*, ytext*/; short offset; /* sanity checks - don't draw anything */ @@ -3243,7 +3243,7 @@ void ANIM_channel_draw_widgets (bAnimContext *ac, bAnimListElem *ale, uiBlock *b y= (ymaxc - yminc)/2 + yminc; ymid= y - 7; /* y-coordinates for text is only 4 down from middle */ - ytext= y - 4; + /* ytext= y - 4; */ /* no button backdrop behind icons */ uiBlockSetEmboss(block, UI_EMBOSSN); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index b07baf45d23..108f06a5cb6 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -2093,6 +2093,8 @@ void ui_check_but(uiBut *but) str= strcat(str, "Alt "); if(but->modifier_key & KM_OSKEY) str= strcat(str, "Cmd "); + + (void)str; /* UNUSED */ } else strcat(but->drawstr, "Press a key "); diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 4457ec6b323..1a240f34757 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -2326,6 +2326,7 @@ static void confirm_operator(bContext *C, wmOperator *op, const char *title, con s= buf; if (title) s+= sprintf(s, "%s%%t|%s", title, item); + (void)s; handle= ui_popup_menu_create(C, NULL, NULL, NULL, NULL, buf); diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index b866a21d027..0f361b43de6 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -332,6 +332,8 @@ void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); } + + (void)dx; } /* image drawing */ diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 445d2f434fa..939c44a0514 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -313,7 +313,7 @@ static char *view3d_modeselect_pup(Scene *scene) if (ob->particlesystem.first || modifiers_findByType(ob, eModifierType_Cloth) || modifiers_findByType(ob, eModifierType_Softbody)) { str += sprintf(str, formatstr, "Particle Mode", OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE); } - + (void)str; return (string); } -- cgit v1.2.3