From 59f1640ae5f53e2360fec2634fdc7d2ec85e2989 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 13 Feb 2011 15:02:21 +0000 Subject: warning cleanup. - fix mistake with grease pencil UI (&& was intended but & used). - use (void) rather then () across _all_ blenders code. - a few minor edits, don't shadow stack variables in roll calculation & avoid running memset() for VBO vertex map. --- source/blender/editors/armature/editarmature.c | 4 +--- source/blender/editors/armature/reeb.c | 2 +- source/blender/editors/gpencil/gpencil_buttons.c | 2 +- source/blender/editors/interface/interface.c | 6 +++--- source/blender/editors/interface/interface_icons.c | 2 +- source/blender/editors/screen/glutil.c | 2 +- source/blender/editors/space_file/filelist.c | 2 +- source/blender/editors/space_file/filesel.c | 2 +- source/blender/editors/space_text/text_python.c | 2 +- source/blender/editors/uvedit/uvedit_parametrizer.c | 2 +- 10 files changed, 12 insertions(+), 14 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 689c792d859..94c1edd90d5 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -2198,10 +2198,8 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op) mul_m3_v3(imat, vec); } else if (type==5) { - bArmature *arm= ob->data; - EditBone *ebone= (EditBone *)arm->act_edbone; float mat[3][3], nor[3]; - + ebone= (EditBone *)arm->act_edbone; if(ebone==NULL) { BKE_report(op->reports, RPT_ERROR, "No active bone set"); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 29ba72ce604..38e23a3d456 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -205,7 +205,7 @@ void REEB_freeGraph(ReebGraph *rg) MEM_freeN(rg); } -ReebGraph * newReebGraph() +ReebGraph * newReebGraph(void) { ReebGraph *rg; rg = MEM_callocN(sizeof(ReebGraph), "reeb graph"); diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 96bc4259661..7590b2558f0 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -141,7 +141,7 @@ static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl) uiItemL(subrow, name, ICON_NULL); /* delete button (only if hidden but not locked!) */ - if ((gpl->flag & GP_LAYER_HIDE) & !(gpl->flag & GP_LAYER_LOCKED)) { + if ((gpl->flag & GP_LAYER_HIDE) && !(gpl->flag & GP_LAYER_LOCKED)) { /* right-align ............................... */ subrow= uiLayoutRow(row, 1); uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_RIGHT); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index bfa9f17a4fb..cb7c8c34f1c 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -80,17 +80,17 @@ static void ui_free_but(const bContext *C, uiBut *but); /* ************* translation ************** */ -int ui_translate_buttons() +int ui_translate_buttons(void) { return (U.transopts & USER_TR_BUTTONS); } -int ui_translate_menus() +int ui_translate_menus(void) { return (U.transopts & USER_TR_MENUS); } -int ui_translate_tooltips() +int ui_translate_tooltips(void) { return (U.transopts & USER_TR_TOOLTIPS); } diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 32b27874cb4..5ea74cbf40a 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -705,7 +705,7 @@ ListBase *UI_iconfile_list(void) } -void UI_icons_free() +void UI_icons_free(void) { if(icongltex.id) { glDeleteTextures(1, &icongltex.id); diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 9b3a51805e9..a39039b254f 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -765,7 +765,7 @@ void bglBegin(int mode) } } -int bglPointHack() { +int bglPointHack(void) { float value[4]; int pointhack_px; glGetFloatv(GL_POINT_SIZE_RANGE, value); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index d9954b584f5..b92b95e2efd 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -395,7 +395,7 @@ void filelist_free_icons(void) } //-----------------FOLDERLIST (previous/next) --------------// -struct ListBase* folderlist_new() +struct ListBase* folderlist_new(void) { ListBase* p = MEM_callocN( sizeof(ListBase), "folderlist" ); return p; diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 6453b527770..9092e639542 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -347,7 +347,7 @@ float file_string_width(const char* str) return BLF_width(style->widget.uifont_id, str); } -float file_font_pointsize() +float file_font_pointsize(void) { #if 0 float s; diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c index 1c75e6f65ca..e6f201e4147 100644 --- a/source/blender/editors/space_text/text_python.c +++ b/source/blender/editors/space_text/text_python.c @@ -98,7 +98,7 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar) return 1; } -void text_pop_suggest_list() +void text_pop_suggest_list(void) { SuggItem *item, *sel; int *top, i; diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index dc5e17b5fae..981332c8fbf 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -4042,7 +4042,7 @@ static void p_smooth(PChart *chart) /* Exported */ -ParamHandle *param_construct_begin() +ParamHandle *param_construct_begin(void) { PHandle *handle = MEM_callocN(sizeof*handle, "PHandle"); handle->construction_chart = p_chart_new(handle); -- cgit v1.2.3