From 1807beabf5372f297329b6be2ab3ba89f954d33a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 16 Oct 2010 02:40:31 +0000 Subject: - UNUSED macro wasn't throwing an error with GCC if a var become used. - made interface, windowmanager, readfile build without unused warnings. - re-arranged CMake's source/blender build order so less changed libs are build later, eg: IK, avi --- source/blender/windowmanager/WM_api.h | 2 +- source/blender/windowmanager/intern/wm.c | 2 +- .../blender/windowmanager/intern/wm_event_system.c | 4 +- source/blender/windowmanager/intern/wm_files.c | 8 +-- source/blender/windowmanager/intern/wm_gesture.c | 26 ++++---- source/blender/windowmanager/intern/wm_keymap.c | 4 +- source/blender/windowmanager/intern/wm_operators.c | 74 +++++++++++----------- source/blender/windowmanager/intern/wm_subwindow.c | 3 +- source/blender/windowmanager/intern/wm_window.c | 14 ++-- source/blender/windowmanager/wm.h | 2 +- source/blender/windowmanager/wm_window.h | 6 +- 11 files changed, 71 insertions(+), 74 deletions(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index f103cbe2d4e..197f99b989e 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -107,7 +107,7 @@ wmKeyConfig *WM_keyconfig_new (struct wmWindowManager *wm, char *idname); wmKeyConfig *WM_keyconfig_new_user(struct wmWindowManager *wm, char *idname); void WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf); void WM_keyconfig_free (struct wmKeyConfig *keyconf); -void WM_keyconfig_userdef(struct wmWindowManager *wm); +void WM_keyconfig_userdef(void); void WM_keymap_init (struct bContext *C); void WM_keymap_free (struct wmKeyMap *keymap); diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 148932fa941..1b0870194a6 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -205,7 +205,7 @@ void WM_keymap_init(bContext *C) /* create default key config */ wm_window_keymap(wm->defaultconf); ED_spacetypes_keymap(wm->defaultconf); - WM_keyconfig_userdef(wm); + WM_keyconfig_userdef(); wm->initialized |= WM_INIT_KEYMAP; } diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 334bc79b96a..f2b880bd0d5 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1894,7 +1894,7 @@ wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap } /* priorities not implemented yet, for time being just insert in begin of list */ -wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int priority) +wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int UNUSED(priority)) { wmEventHandler *handler; @@ -2167,7 +2167,7 @@ static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *wi /* windows store own event queues, no bContext here */ /* time is in 1000s of seconds, from ghost */ -void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int time, void *customdata) +void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int UNUSED(time), void *customdata) { wmWindow *owin; wmEvent event, *evt= win->eventstate; diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 74a8310c2b3..66d2a1efdea 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -283,7 +283,7 @@ void WM_read_file(bContext *C, char *name, ReportList *reports) /* also exit screens and editors */ wm_window_match_init(C, &wmbase); - retval= BKE_read_file(C, name, NULL, reports); + retval= BKE_read_file(C, name, reports); G.save_over = 1; /* this flag is initialized by the operator but overwritten on read. @@ -369,9 +369,9 @@ int WM_read_homefile(bContext *C, wmOperator *op) wm_window_match_init(C, &wmbase); if (!from_memory && BLI_exists(tstr)) { - success = BKE_read_file(C, tstr, NULL, NULL); + success = BKE_read_file(C, tstr, NULL); } else { - success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL, NULL); + success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL); if (wmbase.first == NULL) wm_clear_default_size(C); } @@ -735,7 +735,7 @@ void WM_autosave_init(wmWindowManager *wm) wm->autosavetimer= WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, U.savetime*60.0); } -void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) +void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(wt)) { wmWindow *win; wmEventHandler *handler; diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index e6220eac8f0..8dcf65886e4 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -121,7 +121,7 @@ void WM_gestures_remove(bContext *C) /* tweak and line gestures */ #define TWEAK_THRESHOLD 10 -int wm_gesture_evaluate(bContext *C, wmGesture *gesture) +int wm_gesture_evaluate(wmGesture *gesture) { if(gesture->type==WM_GESTURE_TWEAK) { rcti *rect= gesture->customdata; @@ -159,7 +159,7 @@ int wm_gesture_evaluate(bContext *C, wmGesture *gesture) /* ******************* gesture draw ******************* */ -static void wm_gesture_draw_rect(wmWindow *win, wmGesture *gt) +static void wm_gesture_draw_rect(wmGesture *gt) { rcti *rect= (rcti *)gt->customdata; @@ -183,7 +183,7 @@ static void wm_gesture_draw_rect(wmWindow *win, wmGesture *gt) glDisable(GL_LINE_STIPPLE); } -static void wm_gesture_draw_line(wmWindow *win, wmGesture *gt) +static void wm_gesture_draw_line(wmGesture *gt) { rcti *rect= (rcti *)gt->customdata; @@ -199,7 +199,7 @@ static void wm_gesture_draw_line(wmWindow *win, wmGesture *gt) } -static void wm_gesture_draw_circle(wmWindow *win, wmGesture *gt) +static void wm_gesture_draw_circle(wmGesture *gt) { rcti *rect= (rcti *)gt->customdata; @@ -261,7 +261,7 @@ static void draw_filled_lasso(wmGesture *gt) } } -static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt) +static void wm_gesture_draw_lasso(wmGesture *gt) { short *lasso= (short *)gt->customdata; int i; @@ -320,23 +320,23 @@ void wm_gesture_draw(wmWindow *win) wmSubWindowSet(win, gt->swinid); if(gt->type==WM_GESTURE_RECT) - wm_gesture_draw_rect(win, gt); + wm_gesture_draw_rect(gt); else if(gt->type==WM_GESTURE_TWEAK) - wm_gesture_draw_line(win, gt); + wm_gesture_draw_line(gt); else if(gt->type==WM_GESTURE_CIRCLE) - wm_gesture_draw_circle(win, gt); + wm_gesture_draw_circle(gt); else if(gt->type==WM_GESTURE_CROSS_RECT) { if(gt->mode==1) - wm_gesture_draw_rect(win, gt); + wm_gesture_draw_rect(gt); else wm_gesture_draw_cross(win, gt); } else if(gt->type==WM_GESTURE_LINES) - wm_gesture_draw_lasso(win, gt); + wm_gesture_draw_lasso(gt); else if(gt->type==WM_GESTURE_LASSO) - wm_gesture_draw_lasso(win, gt); + wm_gesture_draw_lasso(gt); else if(gt->type==WM_GESTURE_STRAIGHTLINE) - wm_gesture_draw_line(win, gt); + wm_gesture_draw_line(gt); } } @@ -351,5 +351,3 @@ void wm_gesture_tag_redraw(bContext *C) wm_tag_redraw_overlay(win, ar); } - - diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index f1873b14232..436494be975 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -118,7 +118,7 @@ void WM_keyconfig_free(wmKeyConfig *keyconf) MEM_freeN(keyconf); } -void WM_keyconfig_userdef(wmWindowManager *wm) +void WM_keyconfig_userdef(void) { wmKeyMap *km; wmKeyMapItem *kmi; @@ -419,7 +419,7 @@ char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len) return str; } -static wmKeyMapItem *wm_keymap_item_find_handlers(const bContext *C, ListBase *handlers, const char *opname, int opcontext, IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) +static wmKeyMapItem *wm_keymap_item_find_handlers(const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext), IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) { wmWindowManager *wm= CTX_wm_manager(C); wmEventHandler *handler; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 3b342f440b3..ef3c8fb789e 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -619,7 +619,7 @@ void WM_operator_properties_free(PointerRNA *ptr) /* ************ default op callbacks, exported *********** */ /* invoke callback, uses enum property named "type" */ -int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) +int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { PropertyRNA *prop= op->type->prop; uiPopupMenu *pup; @@ -724,7 +724,7 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op) } -int WM_enum_search_invoke(bContext *C, wmOperator *op, wmEvent *event) +int WM_enum_search_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { uiPupBlock(C, wm_enum_search_menu, op); return OPERATOR_CANCELLED; @@ -751,13 +751,13 @@ int WM_operator_confirm_message(bContext *C, wmOperator *op, char *message) } -int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *event) +int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { return WM_operator_confirm_message(C, op, NULL); } /* op->invoke, opens fileselect if path property not set, otherwise executes */ -int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event) +int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { if (RNA_property_is_set(op->ptr, "filepath")) { return WM_operator_call(C, op); @@ -862,7 +862,7 @@ int WM_operator_winactive(bContext *C) } /* op->invoke */ -static void redo_cb(bContext *C, void *arg_op, int event) +static void redo_cb(bContext *C, void *arg_op, int UNUSED(event)) { wmOperator *lastop= arg_op; @@ -903,7 +903,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) op->layout= NULL; } else - uiDefAutoButsRNA(C, layout, &ptr, columns); + uiDefAutoButsRNA(layout, &ptr, columns); uiPopupBoundsBlock(block, 4.0f, 0, 0); uiEndBlock(C, block); @@ -922,7 +922,7 @@ static void dialog_exec_cb(bContext *C, void *arg1, void *arg2) uiPupBlockClose(C, block); } -void dialog_check_cb(bContext *C, void *op_ptr, void *dummy2) +void dialog_check_cb(bContext *C, void *op_ptr, void *UNUSED(arg)) { wmOperator *op= op_ptr; if(op->type->check) { @@ -966,7 +966,7 @@ static uiBlock *wm_block_create_dialog(bContext *C, ARegion *ar, void *userData) op->layout= NULL; } else - uiDefAutoButsRNA(C, layout, &ptr, columns); + uiDefAutoButsRNA(layout, &ptr, columns); uiBlockSetFunc(block, NULL, NULL, NULL); @@ -1014,7 +1014,7 @@ static uiBlock *wm_operator_create_ui(bContext *C, ARegion *ar, void *userData) return block; } -int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *event) +int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { int retval= OPERATOR_CANCELLED; @@ -1083,7 +1083,7 @@ static uiBlock *wm_block_create_menu(bContext *C, ARegion *ar, void *arg_op) op->layout= NULL; } else - uiDefAutoButsRNA(C, layout, op->ptr, 2); + uiDefAutoButsRNA(layout, op->ptr, 2); uiPopupBoundsBlock(block, 4.0f, 0, 0); uiEndBlock(C, block); @@ -1100,7 +1100,7 @@ static int wm_debug_menu_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { RNA_int_set(op->ptr, "debugval", G.rt); @@ -1127,7 +1127,7 @@ static void WM_OT_debug_menu(wmOperatorType *ot) /* ***************** Splash Screen ************************* */ -static void wm_block_splash_close(bContext *C, void *arg_block, void *arg_unused) +static void wm_block_splash_close(bContext *C, void *arg_block, void *UNUSED(arg)) { uiPupBlockClose(C, arg_block); } @@ -1136,7 +1136,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse /* XXX: hack to refresh splash screen with updated prest menu name, * since popup blocks don't get regenerated like panels do */ -void wm_block_splash_refreshmenu (bContext *C, void *arg_block, void *unused) +void wm_block_splash_refreshmenu (bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg)) { /* ugh, causes crashes in other buttons, disabling for now until * a better fix @@ -1145,7 +1145,7 @@ void wm_block_splash_refreshmenu (bContext *C, void *arg_block, void *unused) */ } -static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unused) +static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(arg)) { uiBlock *block; uiBut *but; @@ -1231,7 +1231,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse return block; } -static int wm_splash_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_splash_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) { uiPupBlock(C, wm_block_create_splash, NULL); @@ -1250,7 +1250,7 @@ static void WM_OT_splash(wmOperatorType *ot) /* ***************** Search menu ************************* */ -static void operator_call_cb(struct bContext *C, void *arg1, void *arg2) +static void operator_call_cb(struct bContext *C, void *UNUSED(arg1), void *arg2) { wmOperatorType *ot= arg2; @@ -1258,7 +1258,7 @@ static void operator_call_cb(struct bContext *C, void *arg1, void *arg2) WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL); } -static void operator_search_cb(const struct bContext *C, void *arg, char *str, uiSearchItems *items) +static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), char *str, uiSearchItems *items) { wmOperatorType *ot = WM_operatortype_first(); @@ -1285,7 +1285,7 @@ static void operator_search_cb(const struct bContext *C, void *arg, char *str, u } } -static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *arg_op) +static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *UNUSED(arg_op)) { static char search[256]= ""; wmEvent event; @@ -1315,15 +1315,13 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *arg_op) return block; } -static int wm_search_menu_exec(bContext *C, wmOperator *op) +static int wm_search_menu_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) { - return OPERATOR_FINISHED; } -static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - uiPupBlock(C, wm_block_search_menu, op); return OPERATOR_CANCELLED; @@ -1389,7 +1387,7 @@ static void WM_OT_window_duplicate(wmOperatorType *ot) ot->idname= "WM_OT_window_duplicate"; ot->description="Duplicate the current Blender window"; - ot->exec= wm_window_duplicate_op; + ot->exec= wm_window_duplicate_exec; ot->poll= wm_operator_winactive_normal; } @@ -1440,7 +1438,7 @@ static void open_set_use_scripts(wmOperator *op) RNA_boolean_set(op->ptr, "use_scripts", !(U.flag & USER_SCRIPT_AUTOEXEC_DISABLE)); } -static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { RNA_string_set(op->ptr, "filepath", G.sce); open_set_load_ui(op); @@ -1496,7 +1494,7 @@ static void WM_OT_open_mainfile(wmOperatorType *ot) /* **************** link/append *************** */ -static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); @@ -1721,7 +1719,7 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { char filename[FILE_MAX]; @@ -1769,7 +1767,7 @@ static void save_set_compress(wmOperator *op) } } -static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { char name[FILE_MAX]; @@ -1820,7 +1818,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op) } /* function used for WM_OT_save_mainfile too */ -static int blend_save_check(bContext *C, wmOperator *op) +static int blend_save_check(bContext *UNUSED(C), wmOperator *op) { char filepath[FILE_MAX]; RNA_string_get(op->ptr, "filepath", filepath); @@ -1850,7 +1848,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot) /* *************** save file directly ******** */ -static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { char name[FILE_MAX]; int check_existing=1; @@ -1985,7 +1983,7 @@ static void WM_OT_window_fullscreen_toggle(wmOperatorType *ot) ot->idname= "WM_OT_window_fullscreen_toggle"; ot->description="Toggle the current window fullscreen"; - ot->exec= wm_window_fullscreen_toggle_op; + ot->exec= wm_window_fullscreen_toggle_exec; ot->poll= WM_operator_winactive; } @@ -2301,7 +2299,7 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event) rect->xmax= event->x - sx; rect->ymax= event->y - sy; - if((val= wm_gesture_evaluate(C, gesture))) { + if((val= wm_gesture_evaluate(gesture))) { wmEvent event; event= *(window->eventstate); @@ -2394,7 +2392,7 @@ int WM_gesture_lines_invoke(bContext *C, wmOperator *op, wmEvent *event) } -static void gesture_lasso_apply(bContext *C, wmOperator *op, int event_type) +static void gesture_lasso_apply(bContext *C, wmOperator *op) { wmGesture *gesture= op->customdata; PointerRNA itemptr; @@ -2463,7 +2461,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) case MIDDLEMOUSE: case RIGHTMOUSE: if(event->val==KM_RELEASE) { /* key release */ - gesture_lasso_apply(C, op, event->type); + gesture_lasso_apply(C, op); return OPERATOR_FINISHED; } break; @@ -2856,11 +2854,11 @@ void WM_radial_control_string(wmOperator *op, char str[], int maxlen) float v = RNA_float_get(op->ptr, "new_value"); if(mode == WM_RADIALCONTROL_SIZE) - sprintf(str, "Size: %d", (int)v); + BLI_snprintf(str, maxlen, "Size: %d", (int)v); else if(mode == WM_RADIALCONTROL_STRENGTH) - sprintf(str, "Strength: %d", (int)v); + BLI_snprintf(str, maxlen, "Strength: %d", (int)v); else if(mode == WM_RADIALCONTROL_ANGLE) - sprintf(str, "Angle: %d", (int)(v * 180.0f/M_PI)); + BLI_snprintf(str, maxlen, "Angle: %d", (int)(v * 180.0f/M_PI)); } /** Important: this doesn't define an actual operator, it @@ -3027,7 +3025,7 @@ static void WM_OT_redraw_timer(wmOperatorType *ot) /* ************************** memory statistics for testing ***************** */ -static int memory_statistics_exec(bContext *C, wmOperator *op) +static int memory_statistics_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) { MEM_printmemlist_stats(); return OPERATOR_FINISHED; @@ -3351,7 +3349,7 @@ void wm_window_keymap(wmKeyConfig *keyconf) } /* Generic itemf's for operators that take library args */ -static EnumPropertyItem *rna_id_itemf(bContext *C, PointerRNA *ptr, int *free, ID *id, int local) +static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), int *free, ID *id, int local) { EnumPropertyItem *item= NULL, item_tmp; int totitem= 0; diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 207b6cebfe6..271b32359f5 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -40,6 +40,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BKE_utildefines.h" #include "BKE_context.h" #include "BKE_global.h" @@ -73,7 +74,7 @@ typedef struct wmSubWindow { /* ******************* open, free, set, get data ******************** */ /* not subwindow itself */ -static void wm_subwindow_free(wmSubWindow *swin) +static void wm_subwindow_free(wmSubWindow *UNUSED(swin)) { /* future fancy stuff */ } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index c31f72d8af1..fbc77d0d06d 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -290,7 +290,7 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win) } /* belongs to below */ -static void wm_window_add_ghostwindow(bContext *C, wmWindowManager *wm, char *title, wmWindow *win) +static void wm_window_add_ghostwindow(bContext *C, char *title, wmWindow *win) { GHOST_WindowHandle ghostwin; int scr_w, scr_h, posy; @@ -384,7 +384,7 @@ void wm_window_add_ghostwindows(bContext* C, wmWindowManager *wm) win->windowstate= initialstate; useprefsize= 0; } - wm_window_add_ghostwindow(C, wm, "Blender", win); + wm_window_add_ghostwindow(C, "Blender", win); } /* happens after fileread */ if(win->eventstate==NULL) @@ -493,7 +493,7 @@ void WM_window_open_temp(bContext *C, rcti *position, int type) /* ****************** Operators ****************** */ /* operator callback */ -int wm_window_duplicate_op(bContext *C, wmOperator *op) +int wm_window_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) { wm_window_copy(C, CTX_wm_window(C)); WM_check(C); @@ -505,7 +505,7 @@ int wm_window_duplicate_op(bContext *C, wmOperator *op) /* fullscreen operator callback */ -int wm_window_fullscreen_toggle_op(bContext *C, wmOperator *op) +int wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *UNUSED(op)) { wmWindow *window= CTX_wm_window(C); GHOST_TWindowState state = GHOST_GetWindowState(window->ghostwin); @@ -895,7 +895,7 @@ void wm_window_process_events(const bContext *C) PIL_sleep_ms(5); } -void wm_window_process_events_nosleep(const bContext *C) +void wm_window_process_events_nosleep(void) { if(GHOST_ProcessEvents(g_system, 0)) GHOST_DispatchEvents(g_system); @@ -943,7 +943,7 @@ void wm_ghost_exit(void) /* **************** timer ********************** */ /* to (de)activate running timers temporary */ -void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *win, wmTimer *timer, int dosleep) +void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer, int dosleep) { wmTimer *wt; @@ -971,7 +971,7 @@ wmTimer *WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, return wt; } -void WM_event_remove_timer(wmWindowManager *wm, wmWindow *win, wmTimer *timer) +void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer) { wmTimer *wt; diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h index 7228a6dcd93..e1ca1793c04 100644 --- a/source/blender/windowmanager/wm.h +++ b/source/blender/windowmanager/wm.h @@ -61,7 +61,7 @@ void wm_tweakevent_test(bContext *C, wmEvent *event, int action); /* wm_gesture.c */ #define WM_LASSO_MIN_POINTS 1024 void wm_gesture_draw(struct wmWindow *win); -int wm_gesture_evaluate(bContext *C, wmGesture *gesture); +int wm_gesture_evaluate(wmGesture *gesture); void wm_gesture_tag_redraw(bContext *C); /* wm_jobs.c */ diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index 5a425df01e1..b0aec50e228 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -45,7 +45,7 @@ void wm_window_close (bContext *C, wmWindowManager *wm, wmWindow *win); void wm_window_title (wmWindowManager *wm, wmWindow *win); void wm_window_add_ghostwindows (bContext *C, wmWindowManager *wm); void wm_window_process_events (const bContext *C); -void wm_window_process_events_nosleep(const bContext *C); +void wm_window_process_events_nosleep(void); void wm_window_make_drawable(bContext *C, wmWindow *win); @@ -65,8 +65,8 @@ wmWindow *wm_window_copy (bContext *C, wmWindow *winorig); void wm_window_testbreak (void); /* *************** window operators ************** */ -int wm_window_duplicate_op (bContext *C, struct wmOperator *op); -int wm_window_fullscreen_toggle_op(bContext *C, struct wmOperator *op); +int wm_window_duplicate_exec(bContext *C, struct wmOperator *op); +int wm_window_fullscreen_toggle_exec(bContext *C, struct wmOperator *op); #endif /* WM_WINDOW_H */ -- cgit v1.2.3