diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-16 18:32:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-16 18:32:17 +0400 |
commit | 8268a4be71fe326b5b7b43e5e55ef751844dddbc (patch) | |
tree | 8b3dfadff9a45f48a31ca62dd2b807434ec614b8 /source/blender/editors | |
parent | 7cc5aaf18afd882ee8fefdf773fb83eb2e0f467b (diff) |
most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
Diffstat (limited to 'source/blender/editors')
70 files changed, 384 insertions, 390 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 3fb8e441d6f..73c7cfd4381 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -89,7 +89,7 @@ /* Draw Backdrop ---------------------------------- */ /* get backdrop color for top-level widgets (Scene and Object only) */ -static void acf_generic_root_color(bAnimContext *ac, bAnimListElem *ale, float *color) +static void acf_generic_root_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float *color) { /* darker blue for top-level widgets */ UI_GetThemeColor3fv(TH_DOPESHEET_CHANNELOB, color); @@ -115,7 +115,7 @@ static void acf_generic_root_backdrop(bAnimContext *ac, bAnimListElem *ale, floa /* get backdrop color for data expanders under top-level Scene/Object */ -static void acf_generic_dataexpand_color(bAnimContext *ac, bAnimListElem *ale, float *color) +static void acf_generic_dataexpand_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float *color) { /* lighter color than top-level widget */ UI_GetThemeColor3fv(TH_DOPESHEET_CHANNELSUBOB, color); @@ -202,11 +202,11 @@ static void acf_generic_channel_backdrop(bAnimContext *ac, bAnimListElem *ale, f /* Indention + Offset ------------------------------------------- */ /* indention level is always the value in the name */ -static short acf_generic_indention_0(bAnimContext *ac, bAnimListElem *ale) +static short acf_generic_indention_0(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale)) { return 0; } -static short acf_generic_indention_1(bAnimContext *ac, bAnimListElem *ale) +static short acf_generic_indention_1(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale)) { return 1; } @@ -218,7 +218,7 @@ static short acf_generic_indention_2(bAnimContext *ac, bAnimListElem *ale) #endif /* indention which varies with the grouping status */ -static short acf_generic_indention_flexible(bAnimContext *ac, bAnimListElem *ale) +static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListElem *ale) { short indent= 0; @@ -352,7 +352,7 @@ static void *acf_generic_dsexpand_setting_ptr(bAnimListElem *ale, int setting, s } /* check if some setting exists for this object-based data-expander (datablock only) */ -static short acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting) +static short acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale), int setting) { switch (setting) { /* expand is always supported */ @@ -375,7 +375,7 @@ static short acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListEle /* Animation Summary ----------------------------------- */ /* get backdrop color for summary widget */ -static void acf_summary_color(bAnimContext *ac, bAnimListElem *ale, float *color) +static void acf_summary_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float *color) { // FIXME: hardcoded color - same as the 'action' line in NLA // reddish color @@ -404,27 +404,27 @@ static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float ymi } /* name for summary entries */ -static void acf_summary_name(bAnimListElem *ale, char *name) +static void acf_summary_name(bAnimListElem *UNUSED(ale), char *name) { if (name) strcpy(name, "DopeSheet Summary"); } // TODO: this is really a temp icon I think -static int acf_summary_icon(bAnimListElem *ale) +static int acf_summary_icon(bAnimListElem *UNUSED(ale)) { return ICON_BORDERMOVE; } /* check if some setting exists for this channel */ -static short acf_summary_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting) +static short acf_summary_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), int setting) { /* only expanded is supported, as it is used for hiding all stuff which the summary covers */ return (setting == ACHANNEL_SETTING_EXPAND); } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_summary_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_summary_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { if (setting == ACHANNEL_SETTING_EXPAND) { /* expanded */ @@ -481,13 +481,13 @@ static bAnimChannelType ACF_SUMMARY = /* Scene ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_scene_icon(bAnimListElem *ale) +static int acf_scene_icon(bAnimListElem *UNUSED(ale)) { return ICON_SCENE_DATA; } /* check if some setting exists for this channel */ -static short acf_scene_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting) +static short acf_scene_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale), int setting) { switch (setting) { /* muted only in NLA */ @@ -509,7 +509,7 @@ static short acf_scene_setting_valid(bAnimContext *ac, bAnimListElem *ale, int s } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_scene_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_scene_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -652,7 +652,7 @@ static short acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, int } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_object_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_object_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -726,7 +726,7 @@ static bAnimChannelType ACF_OBJECT = /* Group ------------------------------------------- */ /* get backdrop color for group widget */ -static void acf_group_color(bAnimContext *ac, bAnimListElem *ale, float *color) +static void acf_group_color(bAnimContext *UNUSED(ac), bAnimListElem *ale, float *color) { /* highlight only for action group channels */ if (ale->flag & AGRP_ACTIVE) @@ -764,7 +764,7 @@ static void acf_group_name(bAnimListElem *ale, char *name) } /* check if some setting exists for this channel */ -static short acf_group_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting) +static short acf_group_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale), int setting) { /* for now, all settings are supported, though some are only conditionally */ switch (setting) { @@ -814,7 +814,7 @@ static int acf_group_setting_flag(bAnimContext *ac, int setting, short *neg) } /* get pointer to the setting */ -static void *acf_group_setting_ptr(bAnimListElem *ale, int setting, short *type) +static void *acf_group_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short *type) { bActionGroup *agrp= (bActionGroup *)ale->data; @@ -875,7 +875,7 @@ static short acf_fcurve_setting_valid(bAnimContext *ac, bAnimListElem *ale, int } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_fcurve_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_fcurve_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -900,7 +900,7 @@ static int acf_fcurve_setting_flag(bAnimContext *ac, int setting, short *neg) } /* get pointer to the setting */ -static void *acf_fcurve_setting_ptr(bAnimListElem *ale, int setting, short *type) +static void *acf_fcurve_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short *type) { FCurve *fcu= (FCurve *)ale->data; @@ -929,13 +929,13 @@ static bAnimChannelType ACF_FCURVE = /* Object Action Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_fillactd_icon(bAnimListElem *ale) +static int acf_fillactd_icon(bAnimListElem *UNUSED(ale)) { return ICON_ACTION; } /* check if some setting exists for this channel */ -static short acf_fillactd_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting) +static short acf_fillactd_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), int setting) { switch (setting) { /* only select and expand supported */ @@ -949,7 +949,7 @@ static short acf_fillactd_setting_valid(bAnimContext *ac, bAnimListElem *ale, in } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_fillactd_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_fillactd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1013,19 +1013,19 @@ static bAnimChannelType ACF_FILLACTD = /* Drivers Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_filldrivers_icon(bAnimListElem *ale) +static int acf_filldrivers_icon(bAnimListElem *UNUSED(ale)) { return ICON_ANIM_DATA; } -static void acf_filldrivers_name(bAnimListElem *ale, char *name) +static void acf_filldrivers_name(bAnimListElem *UNUSED(ale), char *name) { strcpy(name, "Drivers"); } /* check if some setting exists for this channel */ // TODO: this could be made more generic -static short acf_filldrivers_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting) +static short acf_filldrivers_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), int setting) { switch (setting) { /* only expand supported */ @@ -1038,7 +1038,7 @@ static short acf_filldrivers_setting_valid(bAnimContext *ac, bAnimListElem *ale, } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_filldrivers_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_filldrivers_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1091,18 +1091,18 @@ static bAnimChannelType ACF_FILLDRIVERS = /* Materials Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_fillmatd_icon(bAnimListElem *ale) +static int acf_fillmatd_icon(bAnimListElem *UNUSED(ale)) { return ICON_MATERIAL_DATA; } -static void acf_fillmatd_name(bAnimListElem *ale, char *name) +static void acf_fillmatd_name(bAnimListElem *UNUSED(ale), char *name) { strcpy(name, "Materials"); } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_fillmatd_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_fillmatd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1137,18 +1137,18 @@ static bAnimChannelType ACF_FILLMATD= /* Particles Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_fillpartd_icon(bAnimListElem *ale) +static int acf_fillpartd_icon(bAnimListElem *UNUSED(ale)) { return ICON_PARTICLE_DATA; } -static void acf_fillpartd_name(bAnimListElem *ale, char *name) +static void acf_fillpartd_name(bAnimListElem *UNUSED(ale), char *name) { strcpy(name, "Particles"); } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_fillpartd_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_fillpartd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1205,12 +1205,12 @@ static short acf_filltexd_offset(bAnimContext *ac, bAnimListElem *ale) } // TODO: just get this from RNA? -static int acf_filltexd_icon(bAnimListElem *ale) +static int acf_filltexd_icon(bAnimListElem *UNUSED(ale)) { return ICON_TEXTURE_DATA; } -static void acf_filltexd_name(bAnimListElem *ale, char *name) +static void acf_filltexd_name(bAnimListElem *UNUSED(ale), char *name) { strcpy(name, "Textures"); } @@ -1253,7 +1253,7 @@ static void *acf_filltexd_setting_ptr(bAnimListElem *ale, int setting, short *ty } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_filltexd_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_filltexd_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1289,19 +1289,19 @@ static bAnimChannelType ACF_FILLTEXD= /* Material Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dsmat_icon(bAnimListElem *ale) +static int acf_dsmat_icon(bAnimListElem *UNUSED(ale)) { return ICON_MATERIAL_DATA; } /* offset for material expanders */ -static short acf_dsmat_offset(bAnimContext *ac, bAnimListElem *ale) +static short acf_dsmat_offset(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale)) { return 21; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dsmat_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dsmat_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1371,13 +1371,13 @@ static bAnimChannelType ACF_DSMAT= /* Lamp Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dslam_icon(bAnimListElem *ale) +static int acf_dslam_icon(bAnimListElem *UNUSED(ale)) { return ICON_LAMP_DATA; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dslam_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dslam_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1447,13 +1447,13 @@ static bAnimChannelType ACF_DSLAM= /* Texture Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dstex_icon(bAnimListElem *ale) +static int acf_dstex_icon(bAnimListElem *UNUSED(ale)) { return ICON_TEXTURE_DATA; } /* offset for texture expanders */ -static short acf_dstex_offset(bAnimContext *ac, bAnimListElem *ale) +static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *ale) { short offset = 21; @@ -1472,7 +1472,7 @@ static short acf_dstex_offset(bAnimContext *ac, bAnimListElem *ale) } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dstex_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dstex_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1542,13 +1542,13 @@ static bAnimChannelType ACF_DSTEX= /* Camera Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dscam_icon(bAnimListElem *ale) +static int acf_dscam_icon(bAnimListElem *UNUSED(ale)) { return ICON_CAMERA_DATA; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dscam_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dscam_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1634,7 +1634,7 @@ static int acf_dscur_icon(bAnimListElem *ale) } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dscur_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dscur_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1704,13 +1704,13 @@ static bAnimChannelType ACF_DSCUR= /* Shape Key Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dsskey_icon(bAnimListElem *ale) +static int acf_dsskey_icon(bAnimListElem *UNUSED(ale)) { return ICON_SHAPEKEY_DATA; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dsskey_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dsskey_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1780,13 +1780,13 @@ static bAnimChannelType ACF_DSSKEY= /* World Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dswor_icon(bAnimListElem *ale) +static int acf_dswor_icon(bAnimListElem *UNUSED(ale)) { return ICON_WORLD_DATA; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dswor_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dswor_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1856,13 +1856,13 @@ static bAnimChannelType ACF_DSWOR= /* Particle Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dspart_icon(bAnimListElem *ale) +static int acf_dspart_icon(bAnimListElem *UNUSED(ale)) { return ICON_PARTICLE_DATA; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dspart_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dspart_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -1932,13 +1932,13 @@ static bAnimChannelType ACF_DSPART= /* MetaBall Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dsmball_icon(bAnimListElem *ale) +static int acf_dsmball_icon(bAnimListElem *UNUSED(ale)) { return ICON_META_DATA; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dsmball_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dsmball_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -2008,13 +2008,13 @@ static bAnimChannelType ACF_DSMBALL= /* Armature Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dsarm_icon(bAnimListElem *ale) +static int acf_dsarm_icon(bAnimListElem *UNUSED(ale)) { return ICON_ARMATURE_DATA; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dsarm_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dsarm_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -2084,13 +2084,13 @@ static bAnimChannelType ACF_DSARM= /* NodeTree Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dsntree_icon(bAnimListElem *ale) +static int acf_dsntree_icon(bAnimListElem *UNUSED(ale)) { return ICON_NODETREE; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dsntree_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dsntree_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -2160,13 +2160,13 @@ static bAnimChannelType ACF_DSNTREE= /* Mesh Expander ------------------------------------------- */ // TODO: just get this from RNA? -static int acf_dsmesh_icon(bAnimListElem *ale) +static int acf_dsmesh_icon(bAnimListElem *UNUSED(ale)) { return ICON_MESH_DATA; } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_dsmesh_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_dsmesh_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -2251,7 +2251,7 @@ static void acf_shapekey_name(bAnimListElem *ale, char *name) } /* check if some setting exists for this channel */ -static short acf_shapekey_setting_valid(bAnimContext *ac, bAnimListElem *ale, int setting) +static short acf_shapekey_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), int setting) { switch (setting) { case ACHANNEL_SETTING_SELECT: /* selected */ @@ -2266,7 +2266,7 @@ static short acf_shapekey_setting_valid(bAnimContext *ac, bAnimListElem *ale, in } /* get the appropriate flag(s) for the setting when it is valid */ -static int acf_shapekey_setting_flag(bAnimContext *ac, int setting, short *neg) +static int acf_shapekey_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg) { /* clear extra return data first */ *neg= 0; @@ -2851,7 +2851,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float /* ------------------ */ /* callback for (normal) widget settings - send notifiers */ -static void achannel_setting_widget_cb(bContext *C, void *poin, void *poin2) +static void achannel_setting_widget_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2)) { WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); } diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 1ac17aee871..16eb08be933 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1628,7 +1628,7 @@ void ANIM_OT_channels_select_border(wmOperatorType *ot) /* ******************** Mouse-Click Operator *********************** */ /* Handle selection changes due to clicking on channels. Settings will get caught by UI code... */ -static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, short selectmode) +static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_index, short selectmode) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 5312e97c604..ed23e72b328 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -96,7 +96,7 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale) /* tags the given ID block for refreshes (if applicable) due to * Animation Editor editing */ -void ANIM_id_update(Scene *scene, ID *id) +void ANIM_id_update(Scene *UNUSED(scene), ID *id) { if (id) { AnimData *adt= BKE_animdata_from_id(id); @@ -121,7 +121,7 @@ void ANIM_id_update(Scene *scene, ID *id) */ /* perform syncing updates for Action Groups */ -static void animchan_sync_group (bAnimContext *ac, bAnimListElem *ale) +static void animchan_sync_group (bAnimContext *UNUSED(ac), bAnimListElem *ale) { bActionGroup *agrp= (bActionGroup *)ale->data; ID *owner_id= ale->id; @@ -154,7 +154,7 @@ static void animchan_sync_group (bAnimContext *ac, bAnimListElem *ale) } /* perform syncing updates for F-Curves */ -static void animchan_sync_fcurve (bAnimContext *ac, bAnimListElem *ale) +static void animchan_sync_fcurve (bAnimContext *UNUSED(ac), bAnimListElem *ale) { FCurve *fcu= (FCurve *)ale->data; ID *owner_id= ale->id; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 6e5be217164..08b4f8a7bc8 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1065,7 +1065,7 @@ static int animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDopeS * - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation * order, i.e. first to last. Otherwise, some tools may get screwed up. */ -static int animdata_filter_nla (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, void *owner, short ownertype, ID *owner_id) +static int animdata_filter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *UNUSED(ads), AnimData *adt, int filter_mode, void *owner, short ownertype, ID *owner_id) { bAnimListElem *ale; NlaTrack *nlt; diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 0f9ef45ac94..055ee1c3392 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -489,7 +489,7 @@ static int ed_marker_move_invoke(bContext *C, wmOperator *op, wmEvent *evt) } /* note, init has to be called succesfully */ -static void ed_marker_move_apply(bContext *C, wmOperator *op) +static void ed_marker_move_apply(wmOperator *op) { MarkerMove *mm= op->customdata; TimeMarker *marker; @@ -508,7 +508,7 @@ static void ed_marker_move_apply(bContext *C, wmOperator *op) static void ed_marker_move_cancel(bContext *C, wmOperator *op) { RNA_int_set(op->ptr, "frames", 0); - ed_marker_move_apply(C, op); + ed_marker_move_apply(op); ed_marker_move_exit(C, op); WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL); @@ -565,7 +565,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) offs= (int)fac; RNA_int_set(op->ptr, "frames", offs); - ed_marker_move_apply(C, op); + ed_marker_move_apply(op); /* cruft below is for header print */ for (a=0, marker= mm->markers->first; marker; marker= marker->next) { @@ -632,7 +632,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) outputNumInput(&mm->num, str_tx); RNA_int_set(op->ptr, "frames", vec[0]); - ed_marker_move_apply(C, op); + ed_marker_move_apply(op); // ed_marker_header_update(C, op, str, (int)vec[0]); // strcat(str, str_tx); sprintf(str, "Marker offset %s", str_tx); @@ -649,7 +649,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) static int ed_marker_move_exec(bContext *C, wmOperator *op) { if(ed_marker_move_init(C, op)) { - ed_marker_move_apply(C, op); + ed_marker_move_apply(op); ed_marker_move_exit(C, op); return OPERATOR_FINISHED; } @@ -697,7 +697,7 @@ callbacks: /* duplicate selected TimeMarkers */ -static void ed_marker_duplicate_apply(bContext *C, wmOperator *op) +static void ed_marker_duplicate_apply(bContext *C) { ListBase *markers= context_get_markers(C); TimeMarker *marker, *newmarker; @@ -731,7 +731,7 @@ static void ed_marker_duplicate_apply(bContext *C, wmOperator *op) static int ed_marker_duplicate_exec(bContext *C, wmOperator *op) { - ed_marker_duplicate_apply(C, op); + ed_marker_duplicate_apply(C); ed_marker_move_exec(C, op); /* assumes frs delta set */ return OPERATOR_FINISHED; @@ -740,7 +740,7 @@ static int ed_marker_duplicate_exec(bContext *C, wmOperator *op) static int ed_marker_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *evt) { - ed_marker_duplicate_apply(C, op); + ed_marker_duplicate_apply(C); return ed_marker_move_invoke(C, op, evt); } diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 28b51ad0602..6ace48dd301 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -115,7 +115,7 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block */ -short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short flag, int type) +short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short UNUSED(flag), int type) { PointerRNA id_ptr, ptr; PropertyRNA *prop; @@ -193,7 +193,7 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla /* Main Driver Management API calls: * Remove the driver for the specified property on the given ID block (if available) */ -short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index, short flag) +short ANIM_remove_driver (struct ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { AnimData *adt; FCurve *fcu; @@ -262,7 +262,7 @@ short ANIM_driver_can_paste (void) /* Main Driver Management API calls: * Make a copy of the driver for the specified property on the given ID block */ -short ANIM_copy_driver (ID *id, const char rna_path[], int array_index, short flag) +short ANIM_copy_driver (ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { PointerRNA id_ptr, ptr; PropertyRNA *prop; @@ -307,7 +307,7 @@ short ANIM_copy_driver (ID *id, const char rna_path[], int array_index, short fl * Add a new driver for the specified property on the given ID block or replace an existing one * with the driver + driver-curve data from the buffer */ -short ANIM_paste_driver (ID *id, const char rna_path[], int array_index, short flag) +short ANIM_paste_driver (ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { PointerRNA id_ptr, ptr; PropertyRNA *prop; diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 35e6cb66d45..2b8d0f35b9a 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -74,7 +74,7 @@ } /* callback to verify modifier data */ -static void validate_fmodifier_cb (bContext *C, void *fcm_v, void *dummy) +static void validate_fmodifier_cb (bContext *UNUSED(C), void *fcm_v, void *UNUSED(arg)) { FModifier *fcm= (FModifier *)fcm_v; FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm); @@ -215,7 +215,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s /* --------------- */ /* draw settings for generator modifier */ -static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm, short width) +static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width)) { uiLayout *col; PointerRNA ptr; @@ -238,7 +238,7 @@ static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm /* --------------- */ /* draw settings for cycles modifier */ -static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, short width) +static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width)) { uiLayout *split, *col; PointerRNA ptr; @@ -267,7 +267,7 @@ static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, shor /* --------------- */ /* draw settings for noise modifier */ -static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short width) +static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width)) { uiLayout *split, *col; PointerRNA ptr; @@ -374,7 +374,7 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float /* callback to add new envelope data point */ // TODO: should we have a separate file for things like this? -static void fmod_envelope_addpoint_cb (bContext *C, void *fcm_dv, void *dummy) +static void fmod_envelope_addpoint_cb (bContext *C, void *fcm_dv, void *UNUSED(arg)) { Scene *scene= CTX_data_scene(C); FMod_Envelope *env= (FMod_Envelope *)fcm_dv; @@ -426,7 +426,7 @@ static void fmod_envelope_addpoint_cb (bContext *C, void *fcm_dv, void *dummy) /* callback to remove envelope data point */ // TODO: should we have a separate file for things like this? -static void fmod_envelope_deletepoint_cb (bContext *C, void *fcm_dv, void *ind_v) +static void fmod_envelope_deletepoint_cb (bContext *UNUSED(C), void *fcm_dv, void *ind_v) { FMod_Envelope *env= (FMod_Envelope *)fcm_dv; FCM_EnvelopeData *fedn; @@ -454,7 +454,7 @@ static void fmod_envelope_deletepoint_cb (bContext *C, void *fcm_dv, void *ind_v } /* draw settings for envelope modifier */ -static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, short width) +static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width)) { FMod_Envelope *env= (FMod_Envelope *)fcm->data; FCM_EnvelopeData *fed; @@ -509,7 +509,7 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh /* --------------- */ /* draw settings for limits modifier */ -static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, short width) +static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width)) { uiLayout *split, *col, *row; PointerRNA ptr; @@ -557,7 +557,7 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor /* --------------- */ /* draw settings for stepped interpolation modifier */ -static void draw_modifier__stepped(uiLayout *layout, ID *id, FModifier *fcm, short width) +static void draw_modifier__stepped(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width)) { uiLayout *col, *subcol; PointerRNA ptr; diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 02e141a7a69..c895baa49f8 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -655,7 +655,7 @@ void draw_gpl_channel(View2D *v2d, bDopeSheet *ads, bGPDlayer *gpl, float ypos) BLI_dlrbTree_init(&keys); - gpl_to_keylist(ads, gpl, &keys, NULL); + gpl_to_keylist(ads, gpl, &keys); BLI_dlrbTree_linkedlist_sync(&keys); @@ -898,7 +898,7 @@ void action_to_keylist(AnimData *adt, bAction *act, DLRBT_Tree *keys, DLRBT_Tree } -void gpl_to_keylist(bDopeSheet *ads, bGPDlayer *gpl, DLRBT_Tree *keys, DLRBT_Tree *blocks) +void gpl_to_keylist(bDopeSheet *UNUSED(ads), bGPDlayer *gpl, DLRBT_Tree *keys) { bGPDframe *gpf; ActKeyColumn *ak; diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 17d674784f8..590d609ce02 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -369,7 +369,7 @@ static short scene_keyframes_loop(KeyframeEditData *ked, Scene *sce, KeyframeEdi } /* This function is used to loop over the keyframe data in a DopeSheet summary */ -static short summary_keyframes_loop(KeyframeEditData *ked, bAnimContext *ac, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb, int filterflag) +static short summary_keyframes_loop(KeyframeEditData *ked, bAnimContext *ac, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb, int UNUSED(filterflag)) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index befcc0a71cb..68e38d04620 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -486,7 +486,7 @@ void free_anim_copybuf (void) /* ------------------- */ /* This function adds data to the keyframes copy/paste buffer, freeing existing data first */ -short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data) +short copy_animedit_keys (bAnimContext *UNUSED(ac), ListBase *anim_data) { bAnimListElem *ale; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 160116bb1a3..ddd692d26ea 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -917,7 +917,7 @@ short insert_keyframe (ID *id, bAction *act, const char group[], const char rna_ * The flag argument is used for special settings that alter the behaviour of * the keyframe deletion. These include the quick refresh options. */ -short delete_keyframe (ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag) +short delete_keyframe (ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short UNUSED(flag)) { AnimData *adt= BKE_animdata_from_id(id); PointerRNA id_ptr, ptr; diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 55c14411328..57617651823 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -558,7 +558,7 @@ KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, const char name[ /* --------------- */ /* Add the given KeyingSetInfo to the list of type infos, and create an appropriate builtin set too */ -void ANIM_keyingset_info_register (const bContext *C, KeyingSetInfo *ksi) +void ANIM_keyingset_info_register (KeyingSetInfo *ksi) { KeyingSet *ks; diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c index 1c9024f6f91..6eda622ead8 100644 --- a/source/blender/editors/armature/editarmature_generate.c +++ b/source/blender/editors/armature/editarmature_generate.c @@ -46,7 +46,7 @@ #include "armature_intern.h" #include "BIF_generate.h" -void setBoneRollFromNormal(EditBone *bone, float *no, float invmat[][4], float tmat[][3]) +void setBoneRollFromNormal(EditBone *bone, float *no, float UNUSED(invmat[][4]), float tmat[][3]) { if (no != NULL && !is_zero_v3(no)) { @@ -118,7 +118,7 @@ float calcArcCorrelation(BArcIterator *iter, int start, int end, float v0[3], fl } } -int nextFixedSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int start, int end, float head[3], float p[3]) +int nextFixedSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int start, int end, float UNUSED(head[3]), float p[3]) { static float stroke_length = 0; static float current_length; @@ -277,7 +277,7 @@ int nextLengthSubdivision(ToolSettings *toolsettings, BArcIterator *iter, int st return -1; } -EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *editbones, BArcIterator *iter, float invmat[][4], float tmat[][3], NextSubdivisionFunc next_subdividion) +EditBone * subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *UNUSED(editbones), BArcIterator *iter, float invmat[][4], float tmat[][3], NextSubdivisionFunc next_subdividion) { EditBone *lastBone = NULL; EditBone *child = NULL; diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 637c6076314..e80f1494d8c 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -374,7 +374,7 @@ static RigNode *newRigNodeHead(RigGraph *rg, RigArc *arc, float p[3]) return node; } -static void addRigNodeHead(RigGraph *rg, RigArc *arc, RigNode *node) +static void addRigNodeHead(RigGraph *UNUSED(rg), RigArc *arc, RigNode *node) { node->degree++; @@ -1784,7 +1784,7 @@ static void repositionTailControl(RigGraph *rigg, RigControl *ctrl) finalizeControl(rigg, ctrl, 1); /* resize will be recalculated anyway so we don't need it */ } -static void repositionControl(RigGraph *rigg, RigControl *ctrl, float head[3], float tail[3], float qrot[4], float resize) +static void repositionControl(RigGraph *rigg, RigControl *ctrl, float head[3], float UNUSED(tail[3]), float qrot[4], float resize) { float parent_offset[3], tail_offset[3]; @@ -2051,7 +2051,7 @@ static float calcCostLengthDistance(BArcIterator *iter, float **vec_cache, RigEd } #endif -static float calcCostAngleLengthDistance(BArcIterator *iter, float **vec_cache, RigEdge *edge, float *vec0, float *vec1, float *vec2, int i1, int i2, float angle_weight, float length_weight, float distance_weight) +static float calcCostAngleLengthDistance(BArcIterator *iter, float **UNUSED(vec_cache), RigEdge *edge, float *vec0, float *vec1, float *vec2, int i1, int i2, float angle_weight, float length_weight, float distance_weight) { float vec_second[3], vec_first[3]; float length2; diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 84f8513878c..93bddb3834b 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -184,7 +184,7 @@ void BIF_makeListTemplates(const bContext *C) } } -char *BIF_listTemplates(const bContext *C) +char *BIF_listTemplates(const bContext *UNUSED(C)) { GHashIterator ghi; char menu_header[] = "Template%t|None%x0|"; @@ -309,7 +309,7 @@ char * BIF_nameBoneTemplate(const bContext *C) return RIG_nameBone(rg, 0, index); } -void BIF_freeTemplates(bContext *C) +void BIF_freeTemplates(bContext *UNUSED(C)) { if (TEMPLATES_MENU != NULL) { @@ -1029,7 +1029,7 @@ void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_DrawData sub_v3_v3v3(vec, fp, dvec); } -int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) +int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *UNUSED(sketch), SK_Stroke *stk, SK_DrawData *dd) { pt->type = dd->type; pt->mode = PT_PROJECT; @@ -1773,7 +1773,7 @@ int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture) return segments->nb_points - 1; } -int sk_detectCutGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +int sk_detectCutGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { if (gest->nb_segments == 1 && gest->nb_intersections == 1) { @@ -1783,7 +1783,7 @@ int sk_detectCutGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) return 0; } -void sk_applyCutGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +void sk_applyCutGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { SK_Intersection *isect; @@ -1800,7 +1800,7 @@ void sk_applyCutGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) } } -int sk_detectTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +int sk_detectTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { if (gest->nb_segments == 2 && gest->nb_intersections == 1 && gest->nb_self_intersections == 0) { @@ -1821,7 +1821,7 @@ int sk_detectTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) return 0; } -void sk_applyTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +void sk_applyTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { SK_Intersection *isect; float trim_dir[3]; @@ -1856,7 +1856,7 @@ void sk_applyTrimGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) } } -int sk_detectCommandGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +int sk_detectCommandGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { if (gest->nb_segments > 2 && gest->nb_intersections == 2 && gest->nb_self_intersections == 1) { @@ -1883,7 +1883,7 @@ int sk_detectCommandGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) return 0; } -void sk_applyCommandGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +void sk_applyCommandGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { SK_Intersection *isect; int command = 1; @@ -1918,7 +1918,7 @@ void sk_applyCommandGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) } } -int sk_detectDeleteGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +int sk_detectDeleteGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { if (gest->nb_segments == 2 && gest->nb_intersections == 2) { @@ -1939,7 +1939,7 @@ int sk_detectDeleteGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) return 0; } -void sk_applyDeleteGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +void sk_applyDeleteGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *sketch) { SK_Intersection *isect; @@ -1955,7 +1955,7 @@ void sk_applyDeleteGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) } } -int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { ARegion *ar = CTX_wm_region(C); if (gest->nb_segments > 2 && gest->nb_intersections == 2) @@ -2003,7 +2003,7 @@ int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) return 0; } -void sk_applyMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +void sk_applyMergeGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { SK_Intersection *isect; @@ -2034,7 +2034,7 @@ void sk_applyMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) } } -int sk_detectReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +int sk_detectReverseGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { if (gest->nb_segments > 2 && gest->nb_intersections == 2 && gest->nb_self_intersections == 0) { @@ -2076,7 +2076,7 @@ int sk_detectReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) return 0; } -void sk_applyReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +void sk_applyReverseGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { SK_Intersection *isect; @@ -2093,7 +2093,7 @@ void sk_applyReverseGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) } } -int sk_detectConvertGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +int sk_detectConvertGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED(sketch)) { if (gest->nb_segments == 3 && gest->nb_self_intersections == 1) { @@ -2102,7 +2102,7 @@ int sk_detectConvertGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) return 0; } -void sk_applyConvertGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch) +void sk_applyConvertGesture(bContext *C, SK_Gesture *UNUSED(gest), SK_Sketch *sketch) { sk_convert(C, sketch); } @@ -2215,7 +2215,7 @@ void sk_queueRedrawSketch(SK_Sketch *sketch) } } -void sk_drawSketch(Scene *scene, View3D *v3d, SK_Sketch *sketch, int with_names) +void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int with_names) { ToolSettings *ts= scene->toolsettings; SK_Stroke *stk; diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 38372850ff8..10627f95aa7 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -62,7 +62,7 @@ /* ************* XXX *************** */ static void waitcursor(int val) {} -static void progress_bar(int dummy_val, const char *dummy) {} +static void progress_bar(int UNUSED(dummy_val), const char *UNUSED(dummy)) {} static void start_progress_bar() {} static void end_progress_bar() {} static void error(char *str) { printf("error: %s\n", str); } @@ -362,7 +362,7 @@ void laplacian_begin_solve(LaplacianSystem *sys, int index) } } -void laplacian_add_right_hand_side(LaplacianSystem *sys, int v, float value) +void laplacian_add_right_hand_side(LaplacianSystem *UNUSED(sys), int v, float value) { nlRightHandSideAdd(0, v, value); } @@ -1712,7 +1712,7 @@ static void meshdeform_matrix_solve(MeshDeformBind *mdb) nlDeleteContext(context); } -static void harmonic_coordinates_bind(Scene *scene, MeshDeformModifierData *mmd, MeshDeformBind *mdb) +static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierData *mmd, MeshDeformBind *mdb) { MDefBindInfluence *inf; MDefInfluence *mdinf; diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 9602d80575a..32362afca2b 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -1692,7 +1692,7 @@ int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_internal, flo return value; } -int filterCyclesReebGraph(ReebGraph *rg, float distance_threshold) +int filterCyclesReebGraph(ReebGraph *rg, float UNUSED(distance_threshold)) { ReebArc *arc1, *arc2; ReebArc *next2; @@ -1723,7 +1723,7 @@ int filterCyclesReebGraph(ReebGraph *rg, float distance_threshold) return filtered; } -int filterSmartReebGraph(ReebGraph *rg, float threshold) +int filterSmartReebGraph(ReebGraph *rg, float UNUSED(threshold)) { int value = 0; #if 0 //XXX diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 083a90efb25..75156571cf4 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -662,7 +662,7 @@ static short gp_stroke_eraser_splitdel (bGPDframe *gpf, bGPDstroke *gps, int i) } /* eraser tool - check if part of stroke occurs within last segment drawn by eraser */ -static short gp_stroke_eraser_strokeinside (int mval[], int mvalo[], short rad, short x0, short y0, short x1, short y1) +static short gp_stroke_eraser_strokeinside (int mval[], int UNUSED(mvalo[]), short rad, short x0, short y0, short x1, short y1) { /* simple within-radius check for now */ if (edge_inside_circle(mval[0], mval[1], rad, x0, y0, x1, y1)) @@ -1250,7 +1250,7 @@ static int gpencil_draw_cancel (bContext *C, wmOperator *op) /* ------------------------------- */ /* create a new stroke point at the point indicated by the painting context */ -static void gpencil_draw_apply (bContext *C, wmOperator *op, tGPsdata *p) +static void gpencil_draw_apply (wmOperator *op, tGPsdata *p) { /* handle drawing/erasing -> test for erasing first */ if (p->paintmode == GP_PAINTMODE_ERASER) { @@ -1294,7 +1294,7 @@ static void gpencil_draw_apply (bContext *C, wmOperator *op, tGPsdata *p) } /* handle draw event */ -static void gpencil_draw_apply_event (bContext *C, wmOperator *op, wmEvent *event) +static void gpencil_draw_apply_event (wmOperator *op, wmEvent *event) { tGPsdata *p= op->customdata; ARegion *ar= p->ar; @@ -1343,7 +1343,7 @@ static void gpencil_draw_apply_event (bContext *C, wmOperator *op, wmEvent *even RNA_float_set(&itemptr, "pressure", p->pressure); /* apply the current latest drawing point */ - gpencil_draw_apply(C, op, p); + gpencil_draw_apply(op, p); /* force refresh */ ED_region_tag_redraw(p->ar); /* just active area for now, since doing whole screen is too slow */ @@ -1394,7 +1394,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op) } /* apply this data as necessary now (as per usual) */ - gpencil_draw_apply(C, op, p); + gpencil_draw_apply(op, p); } RNA_END; @@ -1456,7 +1456,7 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event) p->status= GP_STATUS_PAINTING; /* handle the initial drawing - i.e. for just doing a simple dot */ - gpencil_draw_apply_event(C, op, event); + gpencil_draw_apply_event(op, event); } else { /* toolbar invoked - don't start drawing yet... */ @@ -1516,7 +1516,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) if (p->status == GP_STATUS_PAINTING) { /* handle drawing event */ //printf("\t\tGP - add point\n"); - gpencil_draw_apply_event(C, op, event); + gpencil_draw_apply_event(op, event); /* finish painting operation if anything went wrong just now */ if (p->status == GP_STATUS_ERROR) { diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 78a645d6b50..ec74ea6123b 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -136,7 +136,7 @@ void scene_to_keylist(struct bDopeSheet *ads, struct Scene *sce, struct DLRBT_Tr void summary_to_keylist(struct bAnimContext *ac, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks); /* Grease Pencil Layer */ // XXX not restored -void gpl_to_keylist(struct bDopeSheet *ads, struct bGPDlayer *gpl, struct DLRBT_Tree *keys, struct DLRBT_Tree *blocks); +void gpl_to_keylist(struct bDopeSheet *ads, struct bGPDlayer *gpl, struct DLRBT_Tree *keys); /* ActKeyColumn API ---------------- */ /* Comparator callback used for ActKeyColumns and cframe float-value pointer */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index b3aac489852..2650005a489 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -183,7 +183,7 @@ struct KeyingSet *ANIM_builtin_keyingset_get_named(struct KeyingSet *prevKS, con KeyingSetInfo *ANIM_keyingset_info_find_named(const char name[]); /* for RNA type registrations... */ -void ANIM_keyingset_info_register(const struct bContext *C, KeyingSetInfo *ksi); +void ANIM_keyingset_info_register(KeyingSetInfo *ksi); void ANIM_keyingset_info_unregister(const struct bContext *C, KeyingSetInfo *ksi); /* cleanup on exit */ diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 313df32fd6f..22779fbba0b 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -225,7 +225,7 @@ void ED_mesh_calc_normals(struct Mesh *me); void ED_mesh_material_link(struct Mesh *me, struct Material *ma); void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges); -int ED_mesh_uv_texture_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me, const char *name, int active_set); +int ED_mesh_uv_texture_add(struct bContext *C, struct Mesh *me, const char *name, int active_set); int ED_mesh_uv_texture_remove(struct bContext *C, struct Object *ob, struct Mesh *me); int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me, const char *name, int active_set); int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 64e72a5e2fa..63af7c5abd3 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -109,7 +109,7 @@ int object_is_libdata(struct Object *ob); int object_data_is_libdata(struct Object *ob); /* object motion paths */ -void ED_objects_clear_paths(struct bContext *C, struct Scene *scene); +void ED_objects_clear_paths(struct bContext *C); void ED_objects_recalculate_paths(struct bContext *C, struct Scene *scene); /* constraints */ diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index c450b41b183..ab8fda85ff2 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3806,7 +3806,7 @@ static int ui_do_but_VECTORSCOPE(bContext *C, uiBlock *block, uiBut *but, uiHand } #ifdef INTERNATIONAL -static int ui_do_but_CHARTAB(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) +static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut *UNUSED(but), uiHandleButtonData *UNUSED(data), wmEvent *UNUSED(event)) { /* XXX 2.50 bad global and state access */ #if 0 diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 2da54b492e6..6d1a72fcd1a 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -876,7 +876,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), ImBuf *ima; /* first allocate imbuf for scaling and copy preview into it */ - ima = IMB_allocImBuf(rw, rh, 32, IB_rect, 0); + ima = IMB_allocImBuf(rw, rh, 32, IB_rect); memcpy(ima->rect, rect, rw*rh*sizeof(unsigned int)); /* scale it */ diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index fc92598591a..e33e24a75ce 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -68,7 +68,7 @@ #include "mesh_intern.h" /* ***************** XXX **************** */ -static int pupmenu(const char *dummy) {return 0;} +static int pupmenu(const char *UNUSED(dummy)) {return 0;} /* ***************** XXX **************** */ @@ -343,7 +343,7 @@ void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int index) // object_tface_flags_changed(OBACT, 0); } -void select_linked_tfaces(bContext *C, Object *ob, short mval[2], int mode) +void select_linked_tfaces(bContext *UNUSED(C), Object *ob, short UNUSED(mval[2]), int mode) { Mesh *me; unsigned int index=0; @@ -464,7 +464,7 @@ int minmax_tface(Object *ob, float *min, float *max) #define ME_SEAM_DONE 2 /* reuse this flag */ -static float edgetag_cut_cost(EditMesh *em, int e1, int e2, int vert) +static float edgetag_cut_cost(int e1, int e2, int vert) { EditVert *v = EM_get_vert_for_index(vert); EditEdge *eed1 = EM_get_edge_for_index(e1), *eed2 = EM_get_edge_for_index(e2); @@ -483,7 +483,7 @@ static float edgetag_cut_cost(EditMesh *em, int e1, int e2, int vert) return cost; } -static void edgetag_add_adjacent(EditMesh *em, Heap *heap, int mednum, int vertnum, int *nedges, int *edges, int *prevedge, float *cost) +static void edgetag_add_adjacent(Heap *heap, int mednum, int vertnum, int *nedges, int *edges, int *prevedge, float *cost) { int startadj, endadj = nedges[vertnum+1]; @@ -495,7 +495,7 @@ static void edgetag_add_adjacent(EditMesh *em, Heap *heap, int mednum, int vertn if (eedadj->f2 & ME_SEAM_DONE) continue; - newcost = cost[mednum] + edgetag_cut_cost(em, mednum, adjnum, vertnum); + newcost = cost[mednum] + edgetag_cut_cost(mednum, adjnum, vertnum); if (cost[adjnum] > newcost) { cost[adjnum] = newcost; @@ -621,8 +621,8 @@ int edgetag_shortest_path(Scene *scene, EditMesh *em, EditEdge *source, EditEdge eed->f2 |= ME_SEAM_DONE; - edgetag_add_adjacent(em, heap, mednum, eed->v1->tmp.l, nedges, edges, prevedge, cost); - edgetag_add_adjacent(em, heap, mednum, eed->v2->tmp.l, nedges, edges, prevedge, cost); + edgetag_add_adjacent(heap, mednum, eed->v1->tmp.l, nedges, edges, prevedge, cost); + edgetag_add_adjacent(heap, mednum, eed->v2->tmp.l, nedges, edges, prevedge, cost); } @@ -819,7 +819,7 @@ void face_borderselect(struct bContext *C, Object *ob, rcti *rect, int select, i view3d_validate_backbuf(&vc); - ibuf = IMB_allocImBuf(sx,sy,32,IB_rect,0); + ibuf = IMB_allocImBuf(sx,sy,32,IB_rect); rt = ibuf->rect; glReadPixels(rect->xmin+vc.ar->winrct.xmin, rect->ymin+vc.ar->winrct.ymin, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); if(ENDIAN_ORDER==B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index ff2fad3f551..80df034552d 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -78,8 +78,8 @@ editmesh.c: */ /* XXX */ -static void BIF_undo_push(const char *dummy) {} -static void error(const char *dummy) {} +static void BIF_undo_push(const char *UNUSED(arg)) {} +static void error(const char *UNUSED(arg)) {} /* ***************** HASH ********************* */ @@ -91,7 +91,7 @@ static void error(const char *dummy) {} /* ************ ADD / REMOVE / FIND ****************** */ -static void *calloc_em(EditMesh *em, size_t size, size_t nr) +static void *calloc_em(EditMesh *UNUSED(em), size_t size, size_t nr) { return calloc(size, nr); } @@ -447,19 +447,19 @@ int editface_containsEdge(EditFace *efa, EditEdge *eed) /* ************************ stuct EditMesh manipulation ***************************** */ /* fake callocs for fastmalloc below */ -static void *calloc_fastvert(EditMesh *em, size_t size, size_t nr) +static void *calloc_fastvert(EditMesh *em, size_t UNUSED(size), size_t UNUSED(nr)) { EditVert *eve= em->curvert++; eve->fast= 1; return eve; } -static void *calloc_fastedge(EditMesh *em, size_t size, size_t nr) +static void *calloc_fastedge(EditMesh *em, size_t UNUSED(size), size_t UNUSED(nr)) { EditEdge *eed= em->curedge++; eed->fast= 1; return eed; } -static void *calloc_fastface(EditMesh *em, size_t size, size_t nr) +static void *calloc_fastface(EditMesh *em, size_t UNUSED(size), size_t UNUSED(nr)) { EditFace *efa= em->curface++; efa->fast= 1; diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index f90f1b095e6..7b23b556994 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -116,7 +116,11 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) short use_proj; em_setup_viewcontext(C, &vc); - + wmWindow *win= CTX_wm_window(C); + + printf("\n%d %d\n", event->x, event->y); + printf("%d %d\n", win->eventstate->x, win->eventstate->y); + use_proj= (vc.scene->toolsettings->snap_flag & SCE_SNAP) && (vc.scene->toolsettings->snap_mode==SCE_SNAP_MODE_FACE); invert_m4_m4(vc.obedit->imat, vc.obedit->obmat); diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index 209a7975357..b632cb2a842 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -215,7 +215,7 @@ static int EM_check_selection(EditMesh *em, void *data) return 0; } -void EM_remove_selection(EditMesh *em, void *data, int type) +void EM_remove_selection(EditMesh *em, void *data, int UNUSED(type)) { EditSelection *ese; for(ese=em->selected.first; ese; ese = ese->next){ @@ -1051,7 +1051,7 @@ static void set_edge_directions_f2(EditMesh *em, int val) /* individual face extrude */ /* will use vertex normals for extrusion directions, so *nor is unaffected */ -short extrudeflag_face_indiv(EditMesh *em, short flag, float *nor) +short extrudeflag_face_indiv(EditMesh *em, short UNUSED(flag), float *UNUSED(nor)) { EditVert *eve, *v1, *v2, *v3, *v4; EditEdge *eed; @@ -1205,7 +1205,7 @@ short extrudeflag_edges_indiv(EditMesh *em, short flag, float *nor) } /* extrudes individual vertices */ -short extrudeflag_verts_indiv(EditMesh *em, short flag, float *nor) +short extrudeflag_verts_indiv(EditMesh *em, short flag, float *UNUSED(nor)) { EditVert *eve; @@ -1231,7 +1231,7 @@ short extrudeflag_verts_indiv(EditMesh *em, short flag, float *nor) /* this is actually a recode of extrudeflag(), using proper edge/face select */ /* hurms, doesnt use 'flag' yet, but its not called by primitive making stuff anyway */ -static short extrudeflag_edge(Object *obedit, EditMesh *em, short flag, float *nor, int all) +static short extrudeflag_edge(Object *obedit, EditMesh *em, short UNUSED(flag), float *nor, int all) { /* all select edges/faces: extrude */ /* old select is cleared, in new ones it is set */ diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 682fbca5072..7595e0d2fe1 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -69,9 +69,9 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv #include "mesh_intern.h" /* **** XXX ******** */ -static void BIF_undo_push(const char *dummy) {} +static void BIF_undo_push(const char *UNUSED(arg)) {} static void BIF_undo() {} -static void error(const char *dummy) {} +static void error(const char *UNUSED(arg)) {} static int qtest() {return 0;} /* **** XXX ******** */ diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index c4ca6166f02..ab01a773020 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -83,8 +83,8 @@ editmesh_mods.c, UI level access, no geometry changes #include "BLO_sys_types.h" // for intptr_t support /* XXX */ -static void waitcursor(int val) {} -static int pupmenu(const char *dummy) {return 0;} +static void waitcursor(int UNUSED(val)) {} +static int pupmenu(const char *UNUSED(arg)) {return 0;} /* ****************************** MIRROR **************** */ @@ -475,7 +475,7 @@ static float labda_PdistVL2Dfl( float *v1, float *v2, float *v3) } /* note; uses v3d, so needs active 3d window */ -static void findnearestedge__doClosest(void *userData, EditEdge *eed, int x0, int y0, int x1, int y1, int index) +static void findnearestedge__doClosest(void *userData, EditEdge *eed, int x0, int y0, int x1, int y1, int UNUSED(index)) { struct { ViewContext vc; float mval[2]; int dist; EditEdge *closest; } *data = userData; float v1[2], v2[2]; @@ -544,7 +544,7 @@ EditEdge *findnearestedge(ViewContext *vc, int *dist) } } -static void findnearestface__getDistance(void *userData, EditFace *efa, int x, int y, int index) +static void findnearestface__getDistance(void *userData, EditFace *efa, int x, int y, int UNUSED(index)) { struct { short mval[2]; int dist; EditFace *toFace; } *data = userData; @@ -1252,7 +1252,7 @@ static int select_similar_exec(bContext *C, wmOperator *op) return similar_face_select_exec(C, op); } -static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *ptr, int *free) +static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { Object *obedit= CTX_data_edit_object(C); EnumPropertyItem *item= NULL; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index fb29257b184..66090f14fff 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -80,7 +80,7 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "mesh_intern.h" /* XXX */ -static void waitcursor(int val) {} +static void waitcursor(int UNUSED(val)) {} #define add_numbut(a, b, c, d, e, f, g) {} /* XXX */ @@ -511,7 +511,7 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) // XXX is this needed? /* called from buttons */ -static void xsortvert_flag__doSetX(void *userData, EditVert *eve, int x, int y, int index) +static void xsortvert_flag__doSetX(void *userData, EditVert *UNUSED(eve), int x, int UNUSED(y), int index) { xvertsort *sortblock = userData; @@ -616,7 +616,7 @@ void hashvert_flag(EditMesh *em, int flag) } /* generic extern called extruder */ -void extrude_mesh(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op, short type) +static void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op, short type) { float nor[3]= {0.0, 0.0, 0.0}; short transmode= 0; @@ -666,11 +666,10 @@ void extrude_mesh(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op, sh // XXX should be a menu item static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data); - extrude_mesh(scene, obedit, em, op, RNA_int_get(op->ptr, "type")); + extrude_mesh(obedit, em, op, RNA_int_get(op->ptr, "type")); BKE_mesh_end_editmesh(obedit->data, em); @@ -683,11 +682,10 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even /* extrude without transform */ static int mesh_extrude_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); EditMesh *em= BKE_mesh_get_editmesh(obedit->data); - extrude_mesh(scene, obedit, em, op, RNA_int_get(op->ptr, "type")); + extrude_mesh(obedit, em, op, RNA_int_get(op->ptr, "type")); DAG_id_flush_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); @@ -704,7 +702,7 @@ EnumPropertyItem extrude_items[] = { {0, NULL, 0, NULL, NULL}}; -static EnumPropertyItem *extrude_itemf(bContext *C, PointerRNA *ptr, int *free) +static EnumPropertyItem *extrude_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { EnumPropertyItem *item= NULL; Object *obedit= CTX_data_edit_object(C); @@ -1189,7 +1187,7 @@ static void erase_vertices(EditMesh *em, ListBase *l) } } -void delete_mesh(Object *obedit, EditMesh *em, wmOperator *op, int event) +static void delete_mesh(EditMesh *em, wmOperator *op, int event) { EditFace *efa, *nextvl; EditVert *eve,*nextve; @@ -1347,7 +1345,7 @@ static int delete_mesh_exec(bContext *C, wmOperator *op) if(type==6) return WM_operator_name_call(C, "MESH_OT_delete_edgeloop", WM_OP_EXEC_DEFAULT, NULL); - delete_mesh(obedit, em, op, type); + delete_mesh(em, op, type); DAG_id_flush_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); @@ -4703,7 +4701,7 @@ useless: } #endif // END OF XXX -int EdgeLoopDelete(EditMesh *em, wmOperator *op) +int EdgeLoopDelete(EditMesh *UNUSED(em), wmOperator *UNUSED(op)) { #if 0 //XXX won't work with new edgeslide @@ -5185,7 +5183,7 @@ static int blend_from_shape_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *ptr, int *free) +static EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { Object *obedit= CTX_data_edit_object(C); Mesh *me= (obedit) ? obedit->data : NULL; @@ -5884,7 +5882,7 @@ static EnumPropertyItem merge_type_items[]= { {5, "COLLAPSE", 0, "Collapse", ""}, {0, NULL, 0, NULL, NULL}}; -static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *ptr, int *free) +static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { Object *obedit= CTX_data_edit_object(C); EnumPropertyItem *item= NULL; diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index 13538a6f218..ac65a3c21d3 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -94,7 +94,7 @@ typedef struct tringselOpData { } tringselOpData; /* modal loop selection drawing callback */ -static void ringsel_draw(const bContext *C, ARegion *ar, void *arg) +static void ringsel_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *arg) { int i; tringselOpData *lcd = arg; @@ -248,7 +248,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select) lcd->totedge = tot; } -static void ringsel_find_edge(tringselOpData *lcd, const bContext *C, ARegion *ar, int cuts) +static void ringsel_find_edge(tringselOpData *lcd, int cuts) { if (lcd->eed) { edgering_sel(lcd, cuts, 0); @@ -293,7 +293,7 @@ static void ringsel_finish(bContext *C, wmOperator *op) } /* called when modal loop selection is done... */ -static void ringsel_exit (bContext *C, wmOperator *op) +static void ringsel_exit(wmOperator *op) { tringselOpData *lcd= op->customdata; @@ -332,10 +332,10 @@ static int ringsel_init (bContext *C, wmOperator *op, int do_cut) return 1; } -static int ringcut_cancel (bContext *C, wmOperator *op) +static int ringcut_cancel (bContext *UNUSED(C), wmOperator *op) { /* this is just a wrapper around exit() */ - ringsel_exit(C, op); + ringsel_exit(op); return OPERATOR_CANCELLED; } @@ -353,7 +353,7 @@ static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt) lcd = op->customdata; if (lcd->em->selectmode == SCE_SELECT_FACE) { - ringsel_exit(C, op); + ringsel_exit(op); WM_operator_name_call(C, "MESH_OT_loop_select", WM_OP_INVOKE_REGION_WIN, NULL); return OPERATOR_CANCELLED; } @@ -363,15 +363,15 @@ static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt) edge = findnearestedge(&lcd->vc, &dist); if(!edge) { - ringsel_exit(C, op); + ringsel_exit(op); return OPERATOR_CANCELLED; } lcd->eed = edge; - ringsel_find_edge(lcd, C, lcd->ar, 1); + ringsel_find_edge(lcd, 1); ringsel_finish(C, op); - ringsel_exit(C, op); + ringsel_exit(op); return OPERATOR_FINISHED; } @@ -397,7 +397,7 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt) edge = findnearestedge(&lcd->vc, &dist); if (edge != lcd->eed) { lcd->eed = edge; - ringsel_find_edge(lcd, C, lcd->ar, 1); + ringsel_find_edge(lcd, 1); } return OPERATOR_RUNNING_MODAL; @@ -418,7 +418,7 @@ static int ringcut_modal (bContext *C, wmOperator *op, wmEvent *event) ED_region_tag_redraw(lcd->ar); ringsel_finish(C, op); - ringsel_exit(C, op); + ringsel_exit(op); return OPERATOR_FINISHED; } @@ -441,7 +441,7 @@ static int ringcut_modal (bContext *C, wmOperator *op, wmEvent *event) if (event->val == KM_PRESS) { cuts++; RNA_int_set(op->ptr, "number_cuts",cuts); - ringsel_find_edge(lcd, C, lcd->ar, cuts); + ringsel_find_edge(lcd, cuts); ED_region_tag_redraw(lcd->ar); } @@ -451,7 +451,7 @@ static int ringcut_modal (bContext *C, wmOperator *op, wmEvent *event) if (event->val == KM_PRESS) { cuts=MAX2(cuts-1,1); RNA_int_set(op->ptr,"number_cuts",cuts); - ringsel_find_edge(lcd, C, lcd->ar,cuts); + ringsel_find_edge(lcd, cuts); ED_region_tag_redraw(lcd->ar); } @@ -466,7 +466,7 @@ static int ringcut_modal (bContext *C, wmOperator *op, wmEvent *event) if (edge != lcd->eed) { lcd->eed = edge; - ringsel_find_edge(lcd, C, lcd->ar, cuts); + ringsel_find_edge(lcd, cuts); } ED_region_tag_redraw(lcd->ar); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 272201df50d..03f2bb42b51 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -157,7 +157,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la } } -int ED_mesh_uv_texture_add(bContext *C, Scene *scene, Object *ob, Mesh *me, const char *name, int active_set) +int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_set) { EditMesh *em; int layernum; @@ -292,7 +292,7 @@ static int uv_texture_add_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; Mesh *me= ob->data; - if(!ED_mesh_uv_texture_add(C, scene, ob, me, NULL, TRUE)) + if(!ED_mesh_uv_texture_add(C, me, NULL, TRUE)) return OPERATOR_CANCELLED; return OPERATOR_FINISHED; diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index c110222a109..ec727d7d82b 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -84,12 +84,12 @@ void make_editMball(Object *obedit) /* This function is called, when MetaBall Object switched from * edit mode to object mode. List od MetaElements is copied * from object->data->edit_elems to object->data->elems. */ -void load_editMball(Object *obedit) +void load_editMball(Object *UNUSED(obedit)) { } /* Add metaelem primitive to metaball object (which is in edit mode) */ -MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int newname) +MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNUSED(newname)) { Object *obedit= CTX_data_edit_object(C); MetaBall *mball = (MetaBall*)obedit->data; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 9de6d002a43..56af4ce1b1c 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -161,11 +161,6 @@ float ED_object_new_primitive_matrix(bContext *C, Object *obedit, float *loc, fl /********************* Add Object Operator ********************/ -void add_object_draw(Scene *scene, View3D *v3d, int type) /* for toolbox or menus, only non-editmode stuff */ -{ - /* keep here to get things compile, remove later */ -} - void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode) { PropertyRNA *prop; @@ -363,11 +358,6 @@ static EnumPropertyItem field_type_items[] = { {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", ""}, {0, NULL, 0, NULL, NULL}}; -void add_effector_draw(Scene *scene, View3D *v3d, int type) /* for toolbox or menus, only non-editmode stuff */ -{ - /* keep here to get things compile, remove later */ -} - /* for effector add primitive operators */ static Object *effector_add_type(bContext *C, wmOperator *op, int type) { @@ -855,7 +845,7 @@ void OBJECT_OT_delete(wmOperatorType *ot) /**************************** Copy Utilities ******************************/ -static void copy_object__forwardModifierLinks(void *userData, Object *ob, +static void copy_object__forwardModifierLinks(void *UNUSED(userData), Object *UNUSED(ob), ID **idpoin) { /* this is copied from ID_NEW; it might be better to have a macro */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 5882478f05e..32e49ce3f71 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -97,9 +97,9 @@ #include "object_intern.h" // own include /* ************* XXX **************** */ -static void error(const char *dummy) {} -static void waitcursor(int val) {} -static int pupmenu(const char *msg) {return 0;} +static void error(const char *UNUSED(arg)) {} +static void waitcursor(int UNUSED(val)) {} +static int pupmenu(const char *UNUSED(msg)) {return 0;} /* port over here */ static bContext *C; @@ -433,7 +433,7 @@ void ED_object_enter_editmode(bContext *C, int flag) if(ob->type==OB_MESH) { Mesh *me= ob->data; - if(me->pv) mesh_pmv_off(ob, me); + if(me->pv) mesh_pmv_off(me); ok= 1; scene->obedit= ob; // context sees this @@ -1565,7 +1565,7 @@ void OBJECT_OT_paths_calculate (wmOperatorType *ot) /* --------- */ /* for the object with pose/action: clear path curves for selected bones only */ -void ED_objects_clear_paths(bContext *C, Scene *scene) +void ED_objects_clear_paths(bContext *C) { /* loop over objects in scene */ CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) @@ -1581,11 +1581,9 @@ void ED_objects_clear_paths(bContext *C, Scene *scene) /* operator callback for this */ static int object_clear_paths_exec (bContext *C, wmOperator *UNUSED(op)) -{ - Scene *scene= CTX_data_scene(C); - +{ /* use the backend function for this */ - ED_objects_clear_paths(C, scene); + ED_objects_clear_paths(C); /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL); @@ -1838,7 +1836,7 @@ void rand_timeoffs(Scene *scene, View3D *v3d) } -static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *ptr, int *free) +static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { EnumPropertyItem *input = object_mode_items; EnumPropertyItem *item= NULL; @@ -2082,7 +2080,7 @@ static EnumPropertyItem game_properties_copy_operations[] ={ static EnumPropertyItem gameprops_items[]= { {0, NULL, 0, NULL, NULL}}; -static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *ptr, int *free) +static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { Object *ob= ED_object_active_context(C); EnumPropertyItem tmp = {0, "", 0, "", ""}; diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 1c22c1820ce..3bdf202aca9 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -250,7 +250,7 @@ int ED_object_modifier_move_down(ReportList *reports, Object *ob, ModifierData * return 1; } -int ED_object_modifier_convert(ReportList *reports, Main *bmain, Scene *scene, Object *ob, ModifierData *md) +int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *scene, Object *ob, ModifierData *md) { Object *obn; ParticleSystem *psys; @@ -365,7 +365,7 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M BKE_report(reports, RPT_ERROR, "Only deforming modifiers can be applied to Shapes"); return 0; } - mesh_pmv_off(ob, me); + mesh_pmv_off(me); dm = mesh_create_derived_for_modifier(scene, ob, md); if (!dm) { @@ -413,7 +413,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob, return 0; } - mesh_pmv_off(ob, me); + mesh_pmv_off(me); /* Multires: ensure that recent sculpting is applied */ if(md->type == eModifierType_Multires) @@ -511,7 +511,7 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi return 1; } -int ED_object_modifier_copy(ReportList *reports, Object *ob, ModifierData *md) +int ED_object_modifier_copy(ReportList *UNUSED(reports), Object *ob, ModifierData *md) { ModifierData *nmd; @@ -540,7 +540,7 @@ static int modifier_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *ptr, int *free) +static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { Object *ob= ED_object_active_context(C); EnumPropertyItem *item= NULL, *md_item; @@ -636,7 +636,7 @@ static int edit_modifier_invoke_properties(bContext *C, wmOperator *op) return 0; } -static ModifierData *edit_modifier_property_get(bContext *C, wmOperator *op, Object *ob, int type) +static ModifierData *edit_modifier_property_get(wmOperator *op, Object *ob, int type) { char modifier_name[32]; ModifierData *md; @@ -657,7 +657,7 @@ static int modifier_remove_exec(bContext *C, wmOperator *op) Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); Object *ob = ED_object_active_context(C); - ModifierData *md = edit_modifier_property_get(C, op, ob, 0); + ModifierData *md = edit_modifier_property_get(op, ob, 0); if(!ob || !md || !ED_object_modifier_remove(op->reports, bmain, scene, ob, md)) return OPERATOR_CANCELLED; @@ -695,7 +695,7 @@ void OBJECT_OT_modifier_remove(wmOperatorType *ot) static int modifier_move_up_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_active_context(C); - ModifierData *md = edit_modifier_property_get(C, op, ob, 0); + ModifierData *md = edit_modifier_property_get(op, ob, 0); if(!ob || !md || !ED_object_modifier_move_up(op->reports, ob, md)) return OPERATOR_CANCELLED; @@ -734,7 +734,7 @@ void OBJECT_OT_modifier_move_up(wmOperatorType *ot) static int modifier_move_down_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_active_context(C); - ModifierData *md = edit_modifier_property_get(C, op, ob, 0); + ModifierData *md = edit_modifier_property_get(op, ob, 0); if(!ob || !md || !ED_object_modifier_move_down(op->reports, ob, md)) return OPERATOR_CANCELLED; @@ -774,7 +774,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *ob = ED_object_active_context(C); - ModifierData *md = edit_modifier_property_get(C, op, ob, 0); + ModifierData *md = edit_modifier_property_get(op, ob, 0); int apply_as= RNA_enum_get(op->ptr, "apply_as"); if(!ob || !md || !ED_object_modifier_apply(op->reports, scene, ob, md, apply_as)) { @@ -824,7 +824,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op) Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); Object *ob = ED_object_active_context(C); - ModifierData *md = edit_modifier_property_get(C, op, ob, 0); + ModifierData *md = edit_modifier_property_get(op, ob, 0); if(!ob || !md || !ED_object_modifier_convert(op->reports, bmain, scene, ob, md)) return OPERATOR_CANCELLED; @@ -863,7 +863,7 @@ void OBJECT_OT_modifier_convert(wmOperatorType *ot) static int modifier_copy_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_active_context(C); - ModifierData *md = edit_modifier_property_get(C, op, ob, 0); + ModifierData *md = edit_modifier_property_get(op, ob, 0); if(!ob || !md || !ED_object_modifier_copy(op->reports, ob, md)) return OPERATOR_CANCELLED; @@ -907,7 +907,7 @@ static int multires_poll(bContext *C) static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_active_context(C); - MultiresModifierData *mmd = (MultiresModifierData *)edit_modifier_property_get(C, op, ob, eModifierType_Multires); + MultiresModifierData *mmd = (MultiresModifierData *)edit_modifier_property_get(op, ob, eModifierType_Multires); if (!mmd) return OPERATOR_CANCELLED; @@ -946,7 +946,7 @@ void OBJECT_OT_multires_higher_levels_delete(wmOperatorType *ot) static int multires_subdivide_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_active_context(C); - MultiresModifierData *mmd = (MultiresModifierData *)edit_modifier_property_get(C, op, ob, eModifierType_Multires); + MultiresModifierData *mmd = (MultiresModifierData *)edit_modifier_property_get(op, ob, eModifierType_Multires); if (!mmd) return OPERATOR_CANCELLED; @@ -988,7 +988,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op) { Object *ob= ED_object_active_context(C), *secondob= NULL; Scene *scene= CTX_data_scene(C); - MultiresModifierData *mmd = (MultiresModifierData *)edit_modifier_property_get(C, op, ob, eModifierType_Multires); + MultiresModifierData *mmd = (MultiresModifierData *)edit_modifier_property_get(op, ob, eModifierType_Multires); if (!mmd) return OPERATOR_CANCELLED; @@ -1076,7 +1076,7 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *U if (!edit_modifier_invoke_properties(C, op)) return OPERATOR_CANCELLED; - mmd = (MultiresModifierData *)edit_modifier_property_get(C, op, ob, eModifierType_Multires); + mmd = (MultiresModifierData *)edit_modifier_property_get(op, ob, eModifierType_Multires); if (!mmd) return OPERATOR_CANCELLED; @@ -1158,7 +1158,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Object *ob = ED_object_active_context(C); - MeshDeformModifierData *mmd = (MeshDeformModifierData *)edit_modifier_property_get(C, op, ob, eModifierType_MeshDeform); + MeshDeformModifierData *mmd = (MeshDeformModifierData *)edit_modifier_property_get(op, ob, eModifierType_MeshDeform); if (!mmd) return OPERATOR_CANCELLED; @@ -1245,7 +1245,7 @@ static int explode_poll(bContext *C) static int explode_refresh_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_active_context(C); - ExplodeModifierData *emd = (ExplodeModifierData *)edit_modifier_property_get(C, op, ob, eModifierType_Explode); + ExplodeModifierData *emd = (ExplodeModifierData *)edit_modifier_property_get(op, ob, eModifierType_Explode); if (!emd) return OPERATOR_CANCELLED; diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 6e9e8eeb5e5..221d1211930 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -378,7 +378,7 @@ void ED_keymap_object(wmKeyConfig *keyconf) ED_object_generic_keymap(keyconf, keymap, 2); } -void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int do_pet) +void ED_object_generic_keymap(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyMap *keymap, int do_pet) { wmKeyMapItem *kmi; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 2a01c870ad6..14f88c6d99e 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -353,7 +353,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op) } /* Generic itemf's for operators that take library args */ -static EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *ptr, int *free) +static EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free) { EnumPropertyItem *item= NULL, item_tmp; int totitem= 0; @@ -1140,7 +1140,7 @@ void OBJECT_OT_move_to_layer(wmOperatorType *ot) /************************** Link to Scene Operator *****************************/ -void link_to_scene(Main *bmain, unsigned short nr) +void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr)) { #if 0 Scene *sce= (Scene*) BLI_findlink(&bmain->scene, G.curscreen->scenenr-1); @@ -1344,7 +1344,7 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) /**************************** Make Single User ********************************/ -static void single_object_users__forwardModifierLinks(void *userData, Object *ob, Object **obpoin) +static void single_object_users__forwardModifierLinks(void *UNUSED(userData), Object *UNUSED(ob), Object **obpoin) { ID_NEW(*obpoin); } @@ -1538,7 +1538,7 @@ void single_obdata_users(Main *bmain, Scene *scene, int flag) } } -void single_ipo_users(Scene *scene, int flag) +void single_ipo_users(Scene *UNUSED(scene), int UNUSED(flag)) { #if 0 // XXX old animation system Object *ob; diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 610f6d95d42..796314ba2e3 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -2022,7 +2022,7 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float /************************* utilities **************************/ -static int remove_tagged_particles(Scene *scene, Object *ob, ParticleSystem *psys, int mirror) +static int remove_tagged_particles(Object *ob, ParticleSystem *psys, int mirror) { PTCacheEdit *edit = psys->edit; ParticleData *pa, *npa=0, *new_pars=0; @@ -2092,7 +2092,7 @@ static int remove_tagged_particles(Scene *scene, Object *ob, ParticleSystem *psy return removed; } -static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys) +static void remove_tagged_keys(Object *ob, ParticleSystem *psys) { PTCacheEdit *edit= psys->edit; ParticleData *pa; @@ -2123,7 +2123,7 @@ static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys) if(new_totkey < 2) point->flag |= PEP_TAG; } - remove_tagged_particles(scene, ob, psys, pe_x_mirror(ob)); + remove_tagged_particles(ob, psys, pe_x_mirror(ob)); LOOP_POINTS { pa = psys->particles + p; @@ -2347,7 +2347,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) BLI_kdtree_free(tree); /* remove tagged particles - don't do mirror here! */ - remove_tagged_particles(scene, ob, psys, 0); + remove_tagged_particles(ob, psys, 0); totremoved += removed; } while(removed); @@ -2430,7 +2430,7 @@ void PARTICLE_OT_weight_set(wmOperatorType *ot) /************************ cursor drawing *******************************/ -static void brush_drawcursor(bContext *C, int x, int y, void *customdata) +static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)) { ParticleEditSettings *pset= PE_settings(CTX_data_scene(C)); ParticleBrushData *brush; @@ -2574,12 +2574,12 @@ static int delete_exec(bContext *C, wmOperator *op) if(type == DEL_KEY) { foreach_selected_key(&data, set_delete_particle_key); - remove_tagged_keys(data.scene, data.ob, data.edit->psys); + remove_tagged_keys(data.ob, data.edit->psys); recalc_lengths(data.edit); } else if(type == DEL_PARTICLE) { foreach_selected_point(&data, set_delete_particle); - remove_tagged_particles(data.scene, data.ob, data.edit->psys, pe_x_mirror(data.ob)); + remove_tagged_particles(data.ob, data.edit->psys, pe_x_mirror(data.ob)); recalc_lengths(data.edit); } @@ -2765,7 +2765,7 @@ void PARTICLE_OT_mirror(wmOperatorType *ot) /************************* brush edit callbacks ********************/ -static void brush_comb(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key) +static void brush_comb(PEData *data, float UNUSED(mat[][4]), float imat[][4], int point_index, int key_index, PTCacheEditKey *key) { ParticleEditSettings *pset= PE_settings(data->scene); float cvec[3], fac; @@ -3034,7 +3034,7 @@ static void brush_puff(PEData *data, int point_index) } -static void brush_weight(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key) +static void brush_weight(PEData *data, float UNUSED(mat[][4]), float imat[][4], int point_index, int key_index, PTCacheEditKey *key) { /* roots have full weight allways */ if(key_index) { @@ -3060,7 +3060,7 @@ static void brush_smooth_get(PEData *data, float mat[][4], float imat[][4], int } } -static void brush_smooth_do(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key) +static void brush_smooth_do(PEData *data, float UNUSED(mat[][4]), float imat[][4], int point_index, int key_index, PTCacheEditKey *key) { float vec[3], dvec[3]; @@ -3401,7 +3401,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) else foreach_point(&data, brush_cut); - removed= remove_tagged_particles(scene, ob, edit->psys, pe_x_mirror(ob)); + removed= remove_tagged_particles(ob, edit->psys, pe_x_mirror(ob)); if(pset->flag & PE_KEEP_LENGTHS) recalc_lengths(edit); } @@ -3538,7 +3538,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) pset->flag |= lock_root; } -static void brush_edit_exit(bContext *C, wmOperator *op) +static void brush_edit_exit(wmOperator *op) { BrushEdit *bedit= op->customdata; @@ -3555,7 +3555,7 @@ static int brush_edit_exec(bContext *C, wmOperator *op) } RNA_END; - brush_edit_exit(C, op); + brush_edit_exit(op); return OPERATOR_FINISHED; } @@ -3597,7 +3597,7 @@ static int brush_edit_modal(bContext *C, wmOperator *op, wmEvent *event) case LEFTMOUSE: case MIDDLEMOUSE: case RIGHTMOUSE: // XXX hardcoded - brush_edit_exit(C, op); + brush_edit_exit(op); return OPERATOR_FINISHED; case MOUSEMOVE: brush_edit_apply_event(C, op, event); @@ -3607,9 +3607,9 @@ static int brush_edit_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static int brush_edit_cancel(bContext *C, wmOperator *op) +static int brush_edit_cancel(bContext *UNUSED(C), wmOperator *op) { - brush_edit_exit(C, op); + brush_edit_exit(op); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index f411f92d395..e4934269173 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -720,7 +720,7 @@ static void fluidbake_free(void *customdata) } /* called by fluidbake, only to check job 'stop' value */ -static int fluidbake_breakjob(void *customdata) +static int fluidbake_breakjob(void *UNUSED(customdata)) { //FluidBakeJob *fb= (FluidBakeJob *)customdata; //return *(fb->stop); @@ -1047,7 +1047,7 @@ int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain) return 1; } -void fluidsimFreeBake(Object *ob) +void fluidsimFreeBake(Object *UNUSED(ob)) { /* not implemented yet */ } @@ -1056,27 +1056,27 @@ void fluidsimFreeBake(Object *ob) /* compile dummy functions for disabled fluid sim */ -FluidsimSettings *fluidsimSettingsNew(Object *srcob) +FluidsimSettings *fluidsimSettingsNew(Object *UNUSED(srcob)) { return NULL; } -void fluidsimSettingsFree(FluidsimSettings *fss) +void fluidsimSettingsFree(FluidsimSettings *UNUSED(fss)) { } -FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *fss) +FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *UNUSED(fss)) { return NULL; } /* only compile dummy functions */ -int fluidsimBake(bContext *C, ReportList *reports, Object *ob) +int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object *UNUSED(ob)) { return 0; } -void fluidsimFreeBake(Object *ob) +void fluidsimFreeBake(Object *UNUSED(ob)) { } diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index 6664dd624b2..9e39862cf5d 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -56,7 +56,7 @@ #include "physics_intern.h" -static int cache_break_test(void *cbd) { +static int cache_break_test(void *UNUSED(cbd)) { return G.afbreek==1; } static int ptcache_bake_all_poll(bContext *C) @@ -75,13 +75,13 @@ static int ptcache_poll(bContext *C) return (ptr.data && ptr.id.data); } -void bake_console_progress(void *arg, int nr) +void bake_console_progress(void *UNUSED(arg), int nr) { printf("\rbake: %3i%%", nr); fflush(stdout); } -void bake_console_progress_end(void *arg) +void bake_console_progress_end(void *UNUSED(arg)) { printf("\n"); } diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 71bee8c5b08..21f10d936bf 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -190,7 +190,7 @@ void draw_tex_crop(Tex *tex) } /* temporal abuse; if id_code is -1 it only does texture.... solve! */ -void BIF_preview_changed(short id_code) +void BIF_preview_changed(short UNUSED(id_code)) { #if 0 ScrArea *sa; @@ -571,7 +571,7 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r /* ******************************** Icon Preview **************************** */ -void ED_preview_icon_draw(const bContext *C, void *idp, void *arg1, void *arg2, rcti *rect) +void ED_preview_icon_draw(const bContext *UNUSED(C), void *UNUSED(idp), void *UNUSED(arg1), void *UNUSED(arg2), rcti *UNUSED(rect)) { } @@ -603,7 +603,7 @@ void view3d_previewrender_progress(RenderResult *rr, volatile rcti *renrect) } -void BIF_view3d_previewrender_signal(ScrArea *sa, short signal) +void BIF_view3d_previewrender_signal(ScrArea *UNUSED(sa), short UNUSED(signal)) { #if 0 View3D *v3d= sa->spacedata.first; @@ -625,7 +625,7 @@ void BIF_view3d_previewrender_signal(ScrArea *sa, short signal) #endif } -void BIF_view3d_previewrender_free(View3D *v3d) +void BIF_view3d_previewrender_free(View3D *UNUSED(v3d)) { #if 0 if(v3d->ri) { @@ -683,7 +683,7 @@ static int view3d_previewrender_get_rects(ScrArea *sa, rctf *viewplane, RenderIn } /* called before a panel gets moved/scaled, makes sure we can see through */ -void BIF_view3d_previewrender_clear(ScrArea *sa) +void BIF_view3d_previewrender_clear(ScrArea *UNUSED(sa)) { #if 0 View3D *v3d= sa->spacedata.first; @@ -844,7 +844,7 @@ void BIF_view3d_previewrender(Main *bmain, Scene *scene, ScrArea *sa) } /* in panel space! */ -static void view3d_previewdraw_rect(ScrArea *sa, uiBlock *block, RenderInfo *ri) +static void view3d_previewdraw_rect(ScrArea *UNUSED(sa), uiBlock *UNUSED(block), RenderInfo *ri) { // rctf dispf; @@ -887,7 +887,7 @@ void BIF_view3d_previewdraw(struct ScrArea *sa, struct uiBlock *block) /* **************************** new shader preview system ****************** */ /* inside thread, called by renderer, sets job update value */ -static void shader_preview_draw(void *spv, RenderResult *rr, volatile struct rcti *rect) +static void shader_preview_draw(void *spv, RenderResult *UNUSED(rr), volatile struct rcti *UNUSED(rect)) { ShaderPreview *sp= spv; @@ -903,7 +903,7 @@ static int shader_preview_break(void *spv) } /* outside thread, called before redraw notifiers, it moves finished preview over */ -static void shader_preview_updatejob(void *spv) +static void shader_preview_updatejob(void *UNUSED(spv)) { // ShaderPreview *sp= spv; @@ -1141,7 +1141,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat /* use same function for icon & shader, so the job manager does not run two of them at the same time. */ -static void common_preview_startjob(void *customdata, short *stop, short *do_update, float *progress) +static void common_preview_startjob(void *customdata, short *stop, short *do_update, float *UNUSED(progress)) { ShaderPreview *sp= customdata; diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 840ab0b2098..bca8100a809 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -116,7 +116,7 @@ static int nodes_use_tex(bNodeTree *ntree, Tex *tex) return 0; } -static void material_changed(Main *bmain, Material *ma) +static void material_changed(Main *UNUSED(bmain), Material *ma) { /* icons */ BKE_icon_changed(BKE_icon_getid(&ma->id)); @@ -208,7 +208,7 @@ static void image_changed(Main *bmain, Image *ima) texture_changed(bmain, tex); } -static void scene_changed(Main *bmain, Scene *sce) +static void scene_changed(Main *bmain, Scene *UNUSED(scene)) { Object *ob; Material *ma; @@ -834,7 +834,7 @@ static int save_envmap(wmOperator *op, Scene *scene, EnvMap *env, char *str, int dx= env->cube[1]->x; if (env->type == ENV_CUBE) { - ibuf = IMB_allocImBuf(3*dx, 2*dx, 24, IB_rectfloat, 0); + ibuf = IMB_allocImBuf(3*dx, 2*dx, 24, IB_rectfloat); IMB_rectcpy(ibuf, env->cube[0], 0, 0, 0, 0, dx, dx); IMB_rectcpy(ibuf, env->cube[1], dx, 0, 0, 0, dx, dx); @@ -844,7 +844,7 @@ static int save_envmap(wmOperator *op, Scene *scene, EnvMap *env, char *str, int IMB_rectcpy(ibuf, env->cube[5], 2*dx, dx, 0, 0, dx, dx); } else if (env->type == ENV_PLANE) { - ibuf = IMB_allocImBuf(dx, dx, 24, IB_rectfloat, 0); + ibuf = IMB_allocImBuf(dx, dx, 24, IB_rectfloat); IMB_rectcpy(ibuf, env->cube[1], 0, 0, 0, 0, dx, dx); } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 138ce19951d..9d178a57465 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1739,7 +1739,7 @@ void ED_screen_animation_timer_update(bScreen *screen, int redraws, int refresh) } /* results in fully updated anim system */ -void ED_update_for_newframe(const bContext *C, int mute) +void ED_update_for_newframe(const bContext *C, int UNUSED(mute)) { Main *bmain= CTX_data_main(C); bScreen *screen= CTX_wm_screen(C); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 5bcf8c18074..5a6acd24c5f 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2897,7 +2897,7 @@ static int scene_new_exec(bContext *C, wmOperator *op) Main *bmain= CTX_data_main(C); int type= RNA_enum_get(op->ptr, "type"); - newscene= copy_scene(bmain, scene, type); + newscene= copy_scene(scene, type); /* these can't be handled in blenkernel curently, so do them here */ if(type == SCE_COPY_LINK_DATA) diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index f1e11430573..937441a6e43 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -84,7 +84,7 @@ static int screenshot_exec(bContext *C, wmOperator *op) if(strlen(path)<FILE_MAXDIR+FILE_MAXFILE-5) BKE_add_image_extension(path, scene->r.imtype); - ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0, 0); + ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0); ibuf->rect= scd->dumprect; BKE_write_ibuf(scene, ibuf, path, scene->r.imtype, scene->r.subimtype, scene->r.quality); @@ -251,7 +251,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float break; } else { - ImBuf *ibuf= IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.planes, 0, 0); + ImBuf *ibuf= IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.planes, 0); char name[FILE_MAXDIR+FILE_MAXFILE]; int ok; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index cd498c274cf..71754c3589a 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -383,7 +383,7 @@ static void *image_undo_push_tile(Image *ima, ImBuf *ibuf, ImBuf **tmpibuf, int return tile->rect; if (*tmpibuf==NULL) - *tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, IB_rectfloat|IB_rect, 0); + *tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, IB_rectfloat|IB_rect); tile= MEM_callocN(sizeof(UndoImageTile), "UndoImageTile"); strcpy(tile->idname, ima->id.name); @@ -410,7 +410,7 @@ static void image_undo_restore(bContext *C, ListBase *lb) UndoImageTile *tile; tmpibuf= IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, - IB_rectfloat|IB_rect, 0); + IB_rectfloat|IB_rect); for(tile=lb->first; tile; tile=tile->next) { /* find image based on name, pointer becomes invalid with global undo */ @@ -4191,7 +4191,7 @@ static ImBuf *imapaint_lift_clone(ImBuf *ibuf, ImBuf *ibufb, int *pos) /* note: allocImbuf returns zero'd memory, so regions outside image will have zero alpha, and hence not be blended onto the image */ int w=ibufb->x, h=ibufb->y, destx=0, desty=0, srcx=pos[0], srcy=pos[1]; - ImBuf *clonebuf= IMB_allocImBuf(w, h, ibufb->depth, ibufb->flags, 0); + ImBuf *clonebuf= IMB_allocImBuf(w, h, ibufb->depth, ibufb->flags); IMB_rectclip(clonebuf, ibuf, &destx, &desty, &srcx, &srcy, &w, &h); IMB_rectblend(clonebuf, ibuf, destx, desty, srcx, srcy, w, h, diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index d8544f34fdf..2e0338b370e 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -290,7 +290,7 @@ static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *path) RNA_int_set(kmi->ptr, "value", 19); } -static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *path) +static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *UNUSED(path)) { wmKeyMapItem *kmi; diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c index c2f82b8e2e0..c21bbadc242 100644 --- a/source/blender/editors/sculpt_paint/paint_undo.c +++ b/source/blender/editors/sculpt_paint/paint_undo.c @@ -62,13 +62,13 @@ static UndoStack MeshUndoStack = {UNDO_PAINT_MESH, {NULL, NULL}, NULL}; /* Generic */ -static void undo_restore(bContext *C, UndoStack *stack, UndoElem *uel) +static void undo_restore(bContext *C, UndoStack *UNUSED(stack), UndoElem *uel) { if(uel && uel->restore) uel->restore(C, &uel->elems); } -static void undo_elem_free(UndoStack *stack, UndoElem *uel) +static void undo_elem_free(UndoStack *UNUSED(stack), UndoElem *uel) { if(uel && uel->free) { uel->free(&uel->elems); diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index f5a02e6fb9c..3c25d861d2f 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -852,7 +852,7 @@ static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float /* else */ /* sets wp->weight to the closest weight value to vertex */ /* note: we cant sample frontbuf, weight colors are interpolated too unpredictable */ -void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode) +void sample_wpaint(Scene *scene, ARegion *ar, View3D *UNUSED(v3d), int mode) { ViewContext vc; ToolSettings *ts= scene->toolsettings; @@ -1256,7 +1256,7 @@ struct WPaintData { char *vgroup_validmap; /*stores if vgroups tie to deforming bones or not*/ }; -static char *wpaint_make_validmap(Mesh *me, Object *ob) +static char *wpaint_make_validmap(Object *ob) { bDeformGroup *dg; ModifierData *md; @@ -1344,7 +1344,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED vgroups affect deform bones*/ wpd->auto_normalize = ts->auto_normalize; if (wpd->auto_normalize) - wpd->vgroup_validmap = wpaint_make_validmap(me, ob); + wpd->vgroup_validmap = wpaint_make_validmap(ob); // if(qual & LR_CTRLKEY) { // sample_wpaint(scene, ar, v3d, 0); @@ -1817,7 +1817,7 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent return 1; } -static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, int index, float mval[2], float pressure, int flip) +static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, int index, float mval[2], float pressure, int UNUSED(flip)) { ViewContext *vc = &vpd->vc; Brush *brush = paint_brush(&vp->paint); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 2e192a08ca5..a3252ca7621 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2534,7 +2534,7 @@ static void sculpt_combine_proxies(Sculpt *sd, SculptSession *ss) /* Flip all the editdata across the axis/axes specified by symm. Used to calculate multiple modifications to the mesh when symmetry is enabled. */ -static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm, const char axis, const float angle, const float feather) +static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm, const char axis, const float angle, const float UNUSED(feather)) { flip_coord(cache->location, cache->true_location, symm); flip_coord(cache->grab_delta_symmetry, cache->grab_delta, symm); diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 18f35502f8b..2be3a51869b 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -180,7 +180,7 @@ static int pack_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; sound->packedfile= newPackedFile(op->reports, sound->name); - sound_load(CTX_data_main(C), sound); + sound_load(sound); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 64d7a12bc4c..11b6123dbbb 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -990,7 +990,7 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode, } else if (ale->type == ANIMTYPE_GPLAYER) { struct bGPDlayer *gpl= (struct bGPDlayer *)ale->data; - gpl_to_keylist(ads, gpl, &anim_keys, NULL); + gpl_to_keylist(ads, gpl, &anim_keys); } /* loop through keyframes, finding one that was within the range clicked on */ diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 1b997ade956..68a93d39062 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -371,7 +371,7 @@ void filelist_init_icons() for (x=0; x<SPECIAL_IMG_COLS; x++) { int tile = SPECIAL_IMG_COLS*y + x; if (tile < SPECIAL_IMG_MAX) { - ibuf = IMB_allocImBuf(SPECIAL_IMG_SIZE, SPECIAL_IMG_SIZE, 32, IB_rect, 0); + ibuf = IMB_allocImBuf(SPECIAL_IMG_SIZE, SPECIAL_IMG_SIZE, 32, IB_rect); for (k=0; k<SPECIAL_IMG_SIZE; k++) { memcpy(&ibuf->rect[k*SPECIAL_IMG_SIZE], &bbuf->rect[(k+y*SPECIAL_IMG_SIZE)*SPECIAL_IMG_SIZE*SPECIAL_IMG_COLS+x*SPECIAL_IMG_SIZE], SPECIAL_IMG_SIZE*sizeof(int)); } @@ -965,7 +965,7 @@ void filelist_from_library(struct FileList* filelist) /* first allocate imbuf for copying preview into it */ if (w > 0 && h > 0 && rect) { - ima = IMB_allocImBuf(w, h, 32, IB_rect, 0); + ima = IMB_allocImBuf(w, h, 32, IB_rect); memcpy(ima->rect, rect, w*h*sizeof(unsigned int)); filelist->filelist[i + 1].image = ima; filelist->filelist[i + 1].flags = IMAGEFILE; diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c index 1277ad9d69c..f5ce5a818d7 100644 --- a/source/blender/editors/space_file/writeimage.c +++ b/source/blender/editors/space_file/writeimage.c @@ -99,7 +99,7 @@ static void save_rendered_image_cb_real(char *name, int confirm) waitcursor(1); /* from screen.c */ - ibuf= IMB_allocImBuf(rres.rectx, rres.recty, scene->r.planes, 0, 0); + ibuf= IMB_allocImBuf(rres.rectx, rres.recty, scene->r.planes, 0); ibuf->rect= (unsigned int *)rres.rect32; ibuf->rect_float= rres.rectf; ibuf->zbuf_float= rres.rectz; diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index d9d027823bc..f5c8388bf67 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -143,7 +143,7 @@ static void wform_put_grid(unsigned char * tgt, int w, int h) static struct ImBuf *make_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) { - struct ImBuf * rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect, 0); + struct ImBuf * rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect); int x,y; unsigned char* src = (unsigned char*) ibuf->rect; unsigned char* tgt = (unsigned char*) rval->rect; @@ -189,7 +189,7 @@ static struct ImBuf *make_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) static struct ImBuf *make_waveform_view_from_ibuf_float(struct ImBuf * ibuf) { - struct ImBuf * rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect, 0); + struct ImBuf * rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect); int x,y; float* src = ibuf->rect_float; unsigned char* tgt = (unsigned char*) rval->rect; @@ -249,7 +249,7 @@ struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf * ibuf) static struct ImBuf *make_sep_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) { struct ImBuf * rval = IMB_allocImBuf( - ibuf->x + 3, 515, 32, IB_rect, 0); + ibuf->x + 3, 515, 32, IB_rect); int x,y; unsigned char* src = (unsigned char*) ibuf->rect; unsigned char* tgt = (unsigned char*) rval->rect; @@ -299,7 +299,7 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_float( struct ImBuf * ibuf) { struct ImBuf * rval = IMB_allocImBuf( - ibuf->x + 3, 515, 32, IB_rect, 0); + ibuf->x + 3, 515, 32, IB_rect); int x,y; float* src = ibuf->rect_float; unsigned char* tgt = (unsigned char*) rval->rect; @@ -422,7 +422,7 @@ static void draw_zebra_float(struct ImBuf * src,struct ImBuf * ibuf,float perc) struct ImBuf * make_zebra_view_from_ibuf(struct ImBuf * src, float perc) { - struct ImBuf * ibuf = IMB_allocImBuf(src->x, src->y, 32, IB_rect, 0); + struct ImBuf * ibuf = IMB_allocImBuf(src->x, src->y, 32, IB_rect); if (src->rect_float) { draw_zebra_float(src, ibuf, perc); @@ -463,7 +463,7 @@ static void draw_histogram_bar(struct ImBuf * ibuf, int x,float val, int col) static struct ImBuf *make_histogram_view_from_ibuf_byte( struct ImBuf * ibuf) { - struct ImBuf * rval = IMB_allocImBuf(515, 128, 32, IB_rect, 0); + struct ImBuf * rval = IMB_allocImBuf(515, 128, 32, IB_rect); int n,c,x,y; unsigned char* src = (unsigned char*) ibuf->rect; @@ -517,7 +517,7 @@ static int get_bin_float(float f) static struct ImBuf *make_histogram_view_from_ibuf_float( struct ImBuf * ibuf) { - struct ImBuf * rval = IMB_allocImBuf(515, 128, 32, IB_rect, 0); + struct ImBuf * rval = IMB_allocImBuf(515, 128, 32, IB_rect); int n,c,x,y; float* src = ibuf->rect_float; @@ -596,7 +596,7 @@ static void vectorscope_put_cross(unsigned char r, unsigned char g, static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) { - struct ImBuf * rval = IMB_allocImBuf(515, 515, 32, IB_rect, 0); + struct ImBuf * rval = IMB_allocImBuf(515, 515, 32, IB_rect); int x,y; char* src = (char*) ibuf->rect; char* tgt = (char*) rval->rect; @@ -643,7 +643,7 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) { - struct ImBuf * rval = IMB_allocImBuf(515, 515, 32, IB_rect, 0); + struct ImBuf * rval = IMB_allocImBuf(515, 515, 32, IB_rect); int x,y; float* src = ibuf->rect_float; char* tgt = (char*) rval->rect; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 6e634252631..67c2a4f1c56 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1140,7 +1140,7 @@ ImBuf *view3d_read_backbuf(ViewContext *vc, short xmin, short ymin, short xmax, if(ymax >= vc->ar->winy) ymaxc= vc->ar->winy-1; else ymaxc= ymax; if(yminc > ymaxc) return NULL; - ibuf= IMB_allocImBuf((xmaxc-xminc+1), (ymaxc-yminc+1), 32, IB_rect,0); + ibuf= IMB_allocImBuf((xmaxc-xminc+1), (ymaxc-yminc+1), 32, IB_rect); view3d_validate_backbuf(vc); @@ -1160,7 +1160,7 @@ ImBuf *view3d_read_backbuf(ViewContext *vc, short xmin, short ymin, short xmax, if(xminc==xmin && xmaxc==xmax && yminc==ymin && ymaxc==ymax) return ibuf; - ibuf1= IMB_allocImBuf( (xmax-xmin+1),(ymax-ymin+1),32,IB_rect,0); + ibuf1= IMB_allocImBuf( (xmax-xmin+1),(ymax-ymin+1),32,IB_rect); rd= ibuf->rect; dr= ibuf1->rect; @@ -2092,7 +2092,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in } /* read in pixels & stamp */ - ibuf= IMB_allocImBuf(sizex, sizey, 32, flag, 0); + ibuf= IMB_allocImBuf(sizex, sizey, 32, flag); if(ibuf->rect_float) glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, ibuf->rect_float); diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 312ae1df590..8b3d99e355d 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1770,7 +1770,7 @@ int ED_view3d_context_activate(bContext *C) return 1; } -static int game_engine_exec(bContext *C, wmOperator *UNUSED(op)) +static int game_engine_exec(bContext *C, wmOperator *op) { #if GAMEBLENDER == 1 Scene *startscene = CTX_data_scene(C); @@ -1780,6 +1780,8 @@ static int game_engine_exec(bContext *C, wmOperator *UNUSED(op)) RegionView3D *rv3d; rcti cam_frame; + (void)op; /* unused */ + // bad context switch .. if(!ED_view3d_context_activate(C)) return OPERATOR_CANCELLED; @@ -1828,6 +1830,7 @@ static int game_engine_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; #else + (void)C; /* unused */ BKE_report(op->reports, RPT_ERROR, "Game engine is disabled in this build."); return OPERATOR_CANCELLED; #endif diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 1778e648e20..4a95d0ec081 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -384,7 +384,7 @@ void BIF_selectOrientation() { #endif } -static void view_editmove(unsigned short event) +static void view_editmove(unsigned short UNUSED(event)) { #if 0 // TRANSFORM_FIX_ME int refresh = 0; @@ -1201,7 +1201,7 @@ static void drawArc(float size, float angle_start, float angle_end, int segments glEnd(); } -static void drawHelpline(bContext *C, int x, int y, void *customdata) +static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata) { TransInfo *t = (TransInfo*)customdata; @@ -1333,16 +1333,16 @@ static void drawHelpline(bContext *C, int x, int y, void *customdata) } } -void drawTransformView(const struct bContext *C, struct ARegion *ar, void *arg) +void drawTransformView(const struct bContext *C, struct ARegion *UNUSED(ar), void *arg) { TransInfo *t = arg; - drawConstraint(C, t); + drawConstraint(t); drawPropCircle(C, t); drawSnapping(C, t); } -void drawTransformPixel(const struct bContext *C, struct ARegion *ar, void *arg) +void drawTransformPixel(const struct bContext *UNUSED(C), struct ARegion *UNUSED(ar), void *UNUSED(arg)) { // TransInfo *t = arg; // @@ -1723,7 +1723,7 @@ void transformApply(const bContext *C, TransInfo *t) } } -void drawTransformApply(const struct bContext *C, struct ARegion *ar, void *arg) +void drawTransformApply(const struct bContext *C, struct ARegion *UNUSED(ar), void *arg) { TransInfo *t = arg; @@ -1896,7 +1896,7 @@ static void protectedQuaternionBits(short protectflag, float *quat, float *oldqu /* ******************* TRANSFORM LIMITS ********************** */ -static void constraintTransLim(TransInfo *t, TransData *td) +static void constraintTransLim(TransInfo *UNUSED(t), TransData *td) { if (td->con) { bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_LOCLIMIT); @@ -1991,7 +1991,7 @@ static void constraintob_from_transdata(bConstraintOb *cob, TransData *td) } } -static void constraintRotLim(TransInfo *t, TransData *td) +static void constraintRotLim(TransInfo *UNUSED(t), TransData *td) { if (td->con) { bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_ROTLIMIT); @@ -2211,7 +2211,7 @@ int handleEventWarp(TransInfo *t, wmEvent *event) return status; } -int Warp(TransInfo *t, short mval[2]) +int Warp(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; float vec[3], circumfac, dist, phi0, co, si, *curs, cursor[3], gcursor[3]; @@ -2309,7 +2309,7 @@ int Warp(TransInfo *t, short mval[2]) /* ************************** SHEAR *************************** */ -void postInputShear(TransInfo *t, float values[3]) +void postInputShear(TransInfo *UNUSED(t), float values[3]) { mul_v3_fl(values, 0.05f); } @@ -2359,7 +2359,7 @@ int handleEventShear(TransInfo *t, wmEvent *event) } -int Shear(TransInfo *t, short mval[2]) +int Shear(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; float vec[3]; @@ -2723,7 +2723,7 @@ void initToSphere(TransInfo *t) t->val /= (float)t->total; } -int ToSphere(TransInfo *t, short mval[2]) +int ToSphere(TransInfo *t, short UNUSED(mval[2])) { float vec[3]; float ratio, radius; @@ -3058,7 +3058,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) } } -int Rotation(TransInfo *t, short mval[2]) +int Rotation(TransInfo *t, short UNUSED(mval[2])) { char str[64]; @@ -3172,7 +3172,7 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a } } -int Trackball(TransInfo *t, short mval[2]) +int Trackball(TransInfo *t, short UNUSED(mval[2])) { char str[128]; float axis1[3], axis2[3]; @@ -3391,7 +3391,7 @@ static void applyTranslation(TransInfo *t, float vec[3]) { } /* uses t->vec to store actual translation in */ -int Translation(TransInfo *t, short mval[2]) +int Translation(TransInfo *t, short UNUSED(mval[2])) { char str[250]; @@ -3457,7 +3457,7 @@ void initShrinkFatten(TransInfo *t) -int ShrinkFatten(TransInfo *t, short mval[2]) +int ShrinkFatten(TransInfo *t, short UNUSED(mval[2])) { float vec[3]; float distance; @@ -3532,7 +3532,7 @@ void initTilt(TransInfo *t) -int Tilt(TransInfo *t, short mval[2]) +int Tilt(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; int i; @@ -3604,7 +3604,7 @@ void initCurveShrinkFatten(TransInfo *t) t->flag |= T_NO_CONSTRAINT; } -int CurveShrinkFatten(TransInfo *t, short mval[2]) +int CurveShrinkFatten(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; float ratio; @@ -3672,7 +3672,7 @@ void initPushPull(TransInfo *t) } -int PushPull(TransInfo *t, short mval[2]) +int PushPull(TransInfo *t, short UNUSED(mval[2])) { float vec[3], axis[3]; float distance; @@ -3805,7 +3805,7 @@ int handleEventBevel(TransInfo *t, wmEvent *event) return 0; } -int Bevel(TransInfo *t, short mval[2]) +int Bevel(TransInfo *t, short UNUSED(mval[2])) { float distance,d; int i; @@ -3873,7 +3873,7 @@ void initBevelWeight(TransInfo *t) t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT; } -int BevelWeight(TransInfo *t, short mval[2]) +int BevelWeight(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; float weight; @@ -3946,7 +3946,7 @@ void initCrease(TransInfo *t) t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT; } -int Crease(TransInfo *t, short mval[2]) +int Crease(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; float crease; @@ -4140,7 +4140,7 @@ void initBoneEnvelope(TransInfo *t) t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT; } -int BoneEnvelope(TransInfo *t, short mval[2]) +int BoneEnvelope(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; float ratio; @@ -4846,7 +4846,7 @@ int doEdgeSlide(TransInfo *t, float perc) return 1; } -int EdgeSlide(TransInfo *t, short mval[2]) +int EdgeSlide(TransInfo *t, short UNUSED(mval[2])) { char str[50]; float final; @@ -4905,7 +4905,7 @@ void initBoneRoll(TransInfo *t) t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT; } -int BoneRoll(TransInfo *t, short mval[2]) +int BoneRoll(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; int i; @@ -5041,7 +5041,7 @@ void initMirror(TransInfo *t) } } -int Mirror(TransInfo *t, short mval[2]) +int Mirror(TransInfo *t, short UNUSED(mval[2])) { TransData *td; float size[3], mat[3][3]; @@ -5118,7 +5118,7 @@ void initAlign(TransInfo *t) initMouseInputMode(t, &t->mouse, INPUT_NONE); } -int Align(TransInfo *t, short mval[2]) +int Align(TransInfo *t, short UNUSED(mval[2])) { TransData *td = t->data; float center[3]; @@ -5221,7 +5221,7 @@ static void applySeqSlide(TransInfo *t, float val[2]) { } } -int SeqSlide(TransInfo *t, short mval[2]) +int SeqSlide(TransInfo *t, short UNUSED(mval[2])) { char str[200]; @@ -5449,7 +5449,7 @@ static void headerTimeTranslate(TransInfo *t, char *str) sprintf(str, "DeltaX: %s", &tvec[0]); } -static void applyTimeTranslate(TransInfo *t, float sval) +static void applyTimeTranslate(TransInfo *t, float UNUSED(sval)) { TransData *td = t->data; TransData2D *td2d = t->data2d; @@ -5751,7 +5751,7 @@ static void applyTimeScale(TransInfo *t) { } } -int TimeScale(TransInfo *t, short mval[2]) +int TimeScale(TransInfo *t, short UNUSED(mval[2])) { char str[200]; @@ -5772,7 +5772,7 @@ int TimeScale(TransInfo *t, short mval[2]) /* ************************************ */ -void BIF_TransformSetUndo(char *str) +void BIF_TransformSetUndo(char *UNUSED(str)) { // TRANSFORM_FIX_ME //Trans.undostr= str; diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 6cfe78a979d..bb6ffe9155f 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -571,7 +571,7 @@ void autokeyframe_pose_cb_func(struct bContext *C, struct Scene *scene, struct V /*********************** Constraints *****************************/ -void drawConstraint(const struct bContext *C, TransInfo *t); +void drawConstraint(TransInfo *t); void getConstraintMatrix(TransInfo *t); void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[]); diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 1e6916f0a86..b15c5b07758 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -593,7 +593,7 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte /*----------------- DRAWING CONSTRAINTS -------------------*/ -void drawConstraint(const struct bContext *C, TransInfo *t) +void drawConstraint(TransInfo *t) { TransCon *tc = &(t->con); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 53e553a0391..22b83ee4c89 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -232,7 +232,7 @@ static void set_prop_dist(TransInfo *t, short with_dist) /* ********************* texture space ********* */ -static void createTransTexspace(bContext *C, TransInfo *t) +static void createTransTexspace(TransInfo *t) { Scene *scene = t->scene; TransData *td; @@ -277,7 +277,7 @@ static void createTransTexspace(bContext *C, TransInfo *t) /* ********************* edge (for crease) ***** */ -static void createTransEdge(bContext *C, TransInfo *t) { +static void createTransEdge(TransInfo *t) { EditMesh *em = ((Mesh *)t->obedit->data)->edit_mesh; TransData *td = NULL; EditEdge *eed; @@ -930,7 +930,7 @@ static short pose_grab_with_ik(Object *ob) /* only called with pose mode active object now */ -static void createTransPose(bContext *C, TransInfo *t, Object *ob) +static void createTransPose(TransInfo *t, Object *ob) { bArmature *arm; bPoseChannel *pchan; @@ -995,7 +995,7 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob) /* ********************* armature ************** */ -static void createTransArmatureVerts(bContext *C, TransInfo *t) +static void createTransArmatureVerts(TransInfo *t) { EditBone *ebo; bArmature *arm= t->obedit->data; @@ -1195,7 +1195,7 @@ static void createTransArmatureVerts(bContext *C, TransInfo *t) /* ********************* meta elements ********* */ -static void createTransMBallVerts(bContext *C, TransInfo *t) +static void createTransMBallVerts(TransInfo *t) { MetaBall *mb = (MetaBall*)t->obedit->data; MetaElem *ml; @@ -1530,7 +1530,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) /* ********************* lattice *************** */ -static void createTransLatticeVerts(bContext *C, TransInfo *t) +static void createTransLatticeVerts(TransInfo *t) { Lattice *latt = ((Lattice*)t->obedit->data)->editlatt->latt; TransData *td = NULL; @@ -1896,7 +1896,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert /* *********************** CrazySpace correction. Now without doing subsurf optimal ****************** */ -static void make_vertexcos__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s) +static void make_vertexcos__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s)) { float *vec = userData; @@ -3978,7 +3978,7 @@ static int SeqTransCount(TransInfo *t, ListBase *seqbase, int depth) } -static TransData *SeqToTransData(TransInfo *t, TransData *td, TransData2D *td2d, TransDataSeq *tdsq, Sequence *seq, int flag, int sel_flag) +static TransData *SeqToTransData(TransData *td, TransData2D *td2d, TransDataSeq *tdsq, Sequence *seq, int flag, int sel_flag) { int start_left; @@ -4063,16 +4063,16 @@ static int SeqToTransData_Recursive(TransInfo *t, ListBase *seqbase, TransData * if (flag & SELECT) { if (flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)) { if (flag & SEQ_LEFTSEL) { - SeqToTransData(t, td++, td2d++, tdsq++, seq, flag, SEQ_LEFTSEL); + SeqToTransData(td++, td2d++, tdsq++, seq, flag, SEQ_LEFTSEL); tot++; } if (flag & SEQ_RIGHTSEL) { - SeqToTransData(t, td++, td2d++, tdsq++, seq, flag, SEQ_RIGHTSEL); + SeqToTransData(td++, td2d++, tdsq++, seq, flag, SEQ_RIGHTSEL); tot++; } } else { - SeqToTransData(t, td++, td2d++, tdsq++, seq, flag, SELECT); + SeqToTransData(td++, td2d++, tdsq++, seq, flag, SELECT); tot++; } } @@ -4232,7 +4232,7 @@ static void createTransSeqData(bContext *C, TransInfo *t) /* transcribe given object into TransData for Transforming */ -static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object *ob) +static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) { Scene *scene = t->scene; float obmtx[3][3]; @@ -4342,7 +4342,7 @@ static void ObjectToTransData(bContext *C, TransInfo *t, TransData *td, Object * /* sets flags in Bases to define whether they take part in transform */ /* it deselects Bases, so we have to call the clear function always after */ -static void set_trans_object_base_flags(bContext *C, TransInfo *t) +static void set_trans_object_base_flags(TransInfo *t) { Scene *scene = t->scene; View3D *v3d = t->view; @@ -5091,7 +5091,7 @@ static void createTransObject(bContext *C, TransInfo *t) TransDataExtension *tx; int propmode = t->flag & T_PROP_EDIT; - set_trans_object_base_flags(C, t); + set_trans_object_base_flags(t); /* count */ t->total= CTX_DATA_COUNT(C, selected_objects); @@ -5130,7 +5130,7 @@ static void createTransObject(bContext *C, TransInfo *t) td->flag |= TD_SKIP; } - ObjectToTransData(C, t, td, ob); + ObjectToTransData(t, td, ob); td->val = NULL; td++; tx++; @@ -5153,7 +5153,7 @@ static void createTransObject(bContext *C, TransInfo *t) td->ext = tx; td->rotOrder= ob->rotmode; - ObjectToTransData(C, t, td, ob); + ObjectToTransData(t, td, ob); td->val = NULL; td++; tx++; @@ -5210,12 +5210,12 @@ void createTransData(bContext *C, TransInfo *t) if (t->options & CTX_TEXTURE) { t->flag |= T_TEXTURE; - createTransTexspace(C, t); + createTransTexspace(t); } else if (t->options & CTX_EDGE) { t->ext = NULL; t->flag |= T_EDIT; - createTransEdge(C, t); + createTransEdge(t); if(t->data && t->flag & T_PROP_EDIT) { sort_trans_data(t); // makes selected become first in array set_prop_dist(t, 1); @@ -5277,14 +5277,14 @@ void createTransData(bContext *C, TransInfo *t) createTransCurveVerts(C, t); } else if (t->obedit->type==OB_LATTICE) { - createTransLatticeVerts(C, t); + createTransLatticeVerts(t); } else if (t->obedit->type==OB_MBALL) { - createTransMBallVerts(C, t); + createTransMBallVerts(t); } else if (t->obedit->type==OB_ARMATURE) { t->flag &= ~T_PROP_EDIT; - createTransArmatureVerts(C, t); + createTransArmatureVerts(t); } else { printf("edit type not implemented!\n"); @@ -5315,7 +5315,7 @@ void createTransData(bContext *C, TransInfo *t) else if (ob && (ob->mode & OB_MODE_POSE)) { // XXX this is currently limited to active armature only... // XXX active-layer checking isn't done as that should probably be checked through context instead - createTransPose(C, t, ob); + createTransPose(t, ob); } else if (ob && (ob->mode & OB_MODE_WEIGHT_PAINT)) { /* important that ob_armature can be set even when its not selected [#23412] @@ -5326,7 +5326,7 @@ void createTransData(bContext *C, TransInfo *t) if(base_arm) { View3D *v3d = t->view; if(BASE_VISIBLE(v3d, base_arm)) { - createTransPose(C, t, ob_armature); + createTransPose(t, ob_armature); } } diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 54a86b3dca1..ce0888b6a30 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -55,7 +55,7 @@ void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) } -void InputSpring(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +void InputSpring(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { float ratio, precise_ratio, dx, dy; if(mi->precision) @@ -93,7 +93,7 @@ void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3 } } -void InputTrackBall(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { if(mi->precision) @@ -162,7 +162,7 @@ void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float ou output[0] = dot_v3v3(t->viewinv[1], vec) * 2.0f; } -void setCustomPoints(TransInfo *t, MouseInput *mi, short start[2], short end[2]) +void setCustomPoints(TransInfo *UNUSED(t), MouseInput *mi, short start[2], short end[2]) { short *data; @@ -178,7 +178,7 @@ void setCustomPoints(TransInfo *t, MouseInput *mi, short start[2], short end[2]) data[3] = end[1]; } -void InputCustomRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { float length; float distance; @@ -211,7 +211,7 @@ void InputCustomRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[ } } -void InputAngle(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { double dx2 = mval[0] - mi->center[0]; double dy2 = mval[1] - mi->center[1]; @@ -272,7 +272,7 @@ void InputAngle(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) output[0] = *angle; } -void initMouseInput(TransInfo *t, MouseInput *mi, int center[2], short mval[2]) +void initMouseInput(TransInfo *UNUSED(t), MouseInput *mi, int center[2], short mval[2]) { mi->factor = 0; mi->precision = 0; diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 1d32f893b80..030ad190dc3 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -1187,7 +1187,7 @@ static void draw_cylinder(GLUquadricObj *qobj, float len, float width) } -static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int moving, int drawflags, int combo, int colcode) +static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int UNUSED(moving), int drawflags, int combo, int colcode) { GLUquadricObj *qobj; float cylen= 0.01f*(float)U.tw_handlesize; diff --git a/source/blender/editors/transform/transform_ndofinput.c b/source/blender/editors/transform/transform_ndofinput.c index 3e47484c54c..1ff16dd5f5f 100644 --- a/source/blender/editors/transform/transform_ndofinput.c +++ b/source/blender/editors/transform/transform_ndofinput.c @@ -65,7 +65,7 @@ static void resetNDofInput(NDofInput *n) } -int handleNDofInput(NDofInput *n, wmEvent *event) +int handleNDofInput(NDofInput *UNUSED(n), wmEvent *UNUSED(event)) { int retval = 0; // TRANSFORM_FIX_ME diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 210ab0d45a8..a01a3b17cd2 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -141,7 +141,7 @@ void BIF_createTransformOrientation(bContext *C, ReportList *reports, char *name } } -TransformOrientation *createObjectSpace(bContext *C, ReportList *reports, char *name, int overwrite) { +TransformOrientation *createObjectSpace(bContext *C, ReportList *UNUSED(reports), char *name, int overwrite) { Base *base = CTX_data_active_base(C); Object *ob; float mat[3][3]; diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index a5950a72fe8..adaaf7c9de6 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -210,7 +210,7 @@ void drawSnapping(const struct bContext *C, TransInfo *t) } } -int handleSnapping(TransInfo *t, wmEvent *event) +int handleSnapping(TransInfo *UNUSED(t), wmEvent *UNUSED(event)) { int status = 0; @@ -596,7 +596,7 @@ void ApplySnapResize(TransInfo *t, float vec[3]) /********************** DISTANCE **************************/ -float TranslationBetween(TransInfo *t, float p1[3], float p2[3]) +float TranslationBetween(TransInfo *UNUSED(t), float p1[3], float p2[3]) { return len_v3v3(p1, p2); } @@ -680,12 +680,12 @@ float ResizeBetween(TransInfo *t, float p1[3], float p2[3]) /********************** CALC **************************/ -void CalcSnapGrid(TransInfo *t, float *vec) +void CalcSnapGrid(TransInfo *t, float *UNUSED(vec)) { snapGridAction(t, t->tsnap.snapPoint, BIG_GEARS); } -void CalcSnapGeometry(TransInfo *t, float *vec) +void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) { if (t->spacetype == SPACE_VIEW3D) { @@ -1194,7 +1194,7 @@ int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], float ray return retval; } -int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) +int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *UNUSED(no), int *dist, float *depth) { float imat[4][4]; float ray_start_local[3], ray_normal_local[3]; @@ -1682,7 +1682,7 @@ void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float no[3], O peel->flag = 0; } -int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], ListBase *depth_peels) +int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], float UNUSED(mval[2]), ListBase *depth_peels) { int retval = 0; int totvert = dm->getNumVerts(dm); diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index 290c8a64881..debb8cedd07 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -37,6 +37,7 @@ #include "DNA_object_types.h" #include "DNA_screen_types.h" +#include "BKE_utildefines.h" #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_global.h" @@ -74,7 +75,7 @@ void undo_editmode_menu(void) // history menu /* ********************************************************************* */ /* ****** XXX ***** */ -void error(const char *dummy) {} +void error(const char *UNUSED(arg)) {} /* ****** XXX ***** */ @@ -341,7 +342,7 @@ void undo_editmode_menu(bContext *C) if(event>0) undo_number(C, event); } -static void do_editmode_undohistorymenu(bContext *C, void *arg, int event) +static void do_editmode_undohistorymenu(bContext *C, void *UNUSED(arg), int event) { Object *obedit= CTX_data_edit_object(C); @@ -351,7 +352,7 @@ static void do_editmode_undohistorymenu(bContext *C, void *arg, int event) } -uiBlock *editmode_undohistorymenu(bContext *C, ARegion *ar, void *arg_unused) +uiBlock *editmode_undohistorymenu(bContext *C, ARegion *ar, void *UNUSED(arg)) { uiBlock *block; UndoElem *uel; diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index f1f2dd8548a..5169b096d09 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -113,7 +113,7 @@ static int draw_uvs_face_check(Scene *scene) return (ts->uv_selectmode == UV_SELECT_FACE); } -static void draw_uvs_shadow(SpaceImage *sima, Object *obedit) +static void draw_uvs_shadow(Object *obedit) { EditMesh *em; EditFace *efa; @@ -374,7 +374,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac } } -static void draw_uvs_other(SpaceImage *sima, Scene *scene, Object *obedit, MTFace *activetf) +static void draw_uvs_other(Scene *scene, Object *obedit, MTFace *activetf) { Base *base; Image *curimage; @@ -440,7 +440,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) /* draw other uvs */ if(sima->flag & SI_DRAW_OTHER) - draw_uvs_other(sima, scene, obedit, activetf); + draw_uvs_other(scene, obedit, activetf); /* 1. draw shadow mesh */ @@ -838,7 +838,7 @@ void draw_uvedit_main(SpaceImage *sima, ARegion *ar, Scene *scene, Object *obedi if(show_uvedit || show_uvshadow) { if(show_uvshadow) - draw_uvs_shadow(sima, obedit); + draw_uvs_shadow(obedit); else draw_uvs(sima, scene, obedit); |