From cd972535027a73ba70069051fe9038b6a8b5696a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 3 Dec 2010 12:30:59 +0000 Subject: - added GCC warning -Wstrict-prototypes - fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute. --- source/blender/editors/space_view3d/drawarmature.c | 2 +- source/blender/editors/space_view3d/drawmesh.c | 2 +- source/blender/editors/space_view3d/drawobject.c | 11 +++-------- source/blender/editors/space_view3d/view3d_draw.c | 12 ++++++------ source/blender/editors/space_view3d/view3d_header.c | 3 --- source/blender/editors/space_view3d/view3d_select.c | 7 ++----- source/blender/editors/space_view3d/view3d_snap.c | 10 +++++----- 7 files changed, 18 insertions(+), 29 deletions(-) (limited to 'source/blender/editors/space_view3d') diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index e65751e1f9d..52a2cd24254 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -427,7 +427,7 @@ static void draw_bonevert_solid(void) glCallList(displist); } -static void draw_bone_octahedral() +static void draw_bone_octahedral(void) { static GLuint displist=0; diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 0fb7ff8ec38..67372821631 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -383,7 +383,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O glShadeModel(GL_SMOOTH); } -static void draw_textured_end() +static void draw_textured_end(void) { /* switch off textures */ GPU_set_tpage(NULL, 0); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index a55e054c457..65b621b1d7a 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -413,9 +413,6 @@ void drawaxes(float size, char drawtype) case OB_PLAINAXES: for (axis=0; axis<3; axis++) { - float v1[3]= {0.0, 0.0, 0.0}; - float v2[3]= {0.0, 0.0, 0.0}; - glBegin(GL_LINES); v1[axis]= size; @@ -478,8 +475,6 @@ void drawaxes(float size, char drawtype) case OB_ARROWS: default: for (axis=0; axis<3; axis++) { - float v1[3]= {0.0, 0.0, 0.0}; - float v2[3]= {0.0, 0.0, 0.0}; int arrow_axis= (axis==0)?1:0; glBegin(GL_LINES); @@ -6278,10 +6273,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) if (list) { bConstraint *curcon; bConstraintOb *cob; - char col[4], col2[4]; + char col1[4], col2[4]; - UI_GetThemeColor3ubv(TH_GRID, col); - UI_make_axis_color(col, col2, 'z'); + UI_GetThemeColor3ubv(TH_GRID, col1); + UI_make_axis_color(col1, col2, 'z'); glColor3ubv((GLubyte *)col2); cob= constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 96329ac5d68..267fcb637d0 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -824,7 +824,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d) sprintf(info, "(%d) %s", CFRA, ob->id.name+2); } - /* colour depends on whether there is a keyframe */ + /* color depends on whether there is a keyframe */ if (id_frame_has_keyframe((ID *)ob, /*BKE_curframe(scene)*/(float)(CFRA), v3d->keyflags)) UI_ThemeColor(TH_VERTEX_SELECT); else @@ -837,7 +837,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d) else sprintf(info, "(%d)", CFRA); - /* colour is always white */ + /* color is always white */ UI_ThemeColor(TH_TEXT_HI); } @@ -2425,13 +2425,13 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) } if(v3d->lay_used != lay_used) { /* happens when loading old files or loading with UI load */ - ARegion *ar; + ARegion *ar_iter; ScrArea *sa= CTX_wm_area(C); /* find header and force tag redraw */ - for(ar= sa->regionbase.first; ar; ar= ar->next) - if(ar->regiontype==RGN_TYPE_HEADER) { - ED_region_tag_redraw(ar); + for(ar_iter= sa->regionbase.first; ar_iter; ar_iter= ar_iter->next) + if(ar_iter->regiontype==RGN_TYPE_HEADER) { + ED_region_tag_redraw(ar_iter); break; } diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 5a7616bb2ec..55675f8a64d 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -81,9 +81,6 @@ #define TEST_EDITMESH if(obedit==0) return; \ if( (v3d->lay & obedit->lay)==0 ) return; -/* XXX port over */ -extern void borderselect(); - /* view3d handler codes */ #define VIEW3D_HANDLER_BACKGROUND 1 #define VIEW3D_HANDLER_PROPERTIES 2 diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 2159aef0695..a3289c4cdc0 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -365,11 +365,8 @@ static void do_lasso_select_pose(ViewContext *vc, Object *ob, short mcords[][2], } } - { - bArmature *arm= ob->data; - if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0) { - arm->act_bone= NULL; - } + if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0) { + arm->act_bone= NULL; } } diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 9f6054a5d4f..5bedcfd793f 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -783,16 +783,16 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op)) transvmain= NULL; } else { - Object *ob= CTX_data_active_object(C); + Object *obact= CTX_data_active_object(C); - if(ob && (ob->mode & OB_MODE_POSE)) { - bArmature *arm= ob->data; + if(obact && (obact->mode & OB_MODE_POSE)) { + bArmature *arm= obact->data; bPoseChannel *pchan; - for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) { + for (pchan = obact->pose->chanbase.first; pchan; pchan=pchan->next) { if(arm->layer & pchan->bone->layer) { if(pchan->bone->flag & BONE_SELECTED) { VECCOPY(vec, pchan->pose_head); - mul_m4_v3(ob->obmat, vec); + mul_m4_v3(obact->obmat, vec); add_v3_v3(centroid, vec); DO_MINMAX(vec, min, max); count++; -- cgit v1.2.3