- UNUSED macro wasn't throwing an error with GCC if a var become used.

- made interface, windowmanager, readfile build without unused warnings.
- re-arranged CMake's source/blender build order so less changed libs are build later, eg: IK, avi
This commit is contained in:
Campbell Barton 2010-10-16 02:40:31 +00:00
parent 17085e967e
commit 1807beabf5
50 changed files with 273 additions and 281 deletions

@ -29,23 +29,23 @@ IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-parameter")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
ADD_SUBDIRECTORY(windowmanager)
ADD_SUBDIRECTORY(editors)
ADD_SUBDIRECTORY(avi)
ADD_SUBDIRECTORY(nodes)
ADD_SUBDIRECTORY(windowmanager)
ADD_SUBDIRECTORY(blenkernel)
ADD_SUBDIRECTORY(modifiers)
ADD_SUBDIRECTORY(blenlib)
ADD_SUBDIRECTORY(blenloader)
ADD_SUBDIRECTORY(blenpluginapi)
ADD_SUBDIRECTORY(imbuf)
ADD_SUBDIRECTORY(gpu)
ADD_SUBDIRECTORY(makesdna)
ADD_SUBDIRECTORY(makesrna)
ADD_SUBDIRECTORY(readblenfile)
ADD_SUBDIRECTORY(render)
ADD_SUBDIRECTORY(blenfont)
ADD_SUBDIRECTORY(blenloader)
ADD_SUBDIRECTORY(readblenfile)
ADD_SUBDIRECTORY(blenpluginapi)
ADD_SUBDIRECTORY(ikplugin)
ADD_SUBDIRECTORY(gpu)
ADD_SUBDIRECTORY(imbuf)
ADD_SUBDIRECTORY(avi)
ADD_SUBDIRECTORY(nodes)
ADD_SUBDIRECTORY(modifiers)
ADD_SUBDIRECTORY(makesdna)
ADD_SUBDIRECTORY(makesrna)
IF(WITH_IMAGE_OPENEXR)
ADD_SUBDIRECTORY(imbuf/intern/openexr)

@ -50,8 +50,8 @@ struct Main;
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
int BKE_read_file(struct bContext *C, char *dir, void *type_r, struct ReportList *reports);
int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, void *type_r, struct ReportList *reports);
int BKE_read_file(struct bContext *C, char *dir, struct ReportList *reports);
int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, struct ReportList *reports);
int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
void free_blender(void);

@ -44,8 +44,10 @@
#define STRINGIFY_ARG(x) #x
#define STRINGIFY(x) STRINGIFY_ARG(x)
#ifdef __GNUC__
# define UNUSED(x) x __attribute__((__unused__))
# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
#else
# define UNUSED(x) x
#endif

@ -365,7 +365,7 @@ void BKE_userdef_free(void)
2: OK, and with new user settings
*/
int BKE_read_file(bContext *C, char *dir, void *unused, ReportList *reports)
int BKE_read_file(bContext *C, char *dir, ReportList *reports)
{
BlendFileData *bfd;
int retval= 1;
@ -392,7 +392,7 @@ int BKE_read_file(bContext *C, char *dir, void *unused, ReportList *reports)
return (bfd?retval:0);
}
int BKE_read_file_from_memory(bContext *C, char* filebuf, int filelength, void *unused, ReportList *reports)
int BKE_read_file_from_memory(bContext *C, char* filebuf, int filelength, ReportList *reports)
{
BlendFileData *bfd;
@ -474,7 +474,7 @@ static int read_undosave(bContext *C, UndoElem *uel)
G.fileflags |= G_FILE_NO_UI;
if(UNDO_DISK)
success= BKE_read_file(C, uel->str, NULL, NULL);
success= BKE_read_file(C, uel->str, NULL);
else
success= BKE_read_file_from_memfile(C, &uel->memfile, NULL);
@ -554,7 +554,7 @@ void BKE_write_undo(bContext *C, char *name)
if(curundo->prev) prevfile= &(curundo->prev->memfile);
memused= MEM_get_memory_in_use();
success= BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags, NULL);
success= BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags);
curundo->undosize= MEM_get_memory_in_use() - memused;
}

@ -1399,7 +1399,7 @@ int BLI_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3],
//#include <GL/glew.h>
void BLI_pbvh_node_draw(PBVHNode *node, void *data)
void BLI_pbvh_node_draw(PBVHNode *node, void *UNUSED(data))
{
#if 0
/* XXX: Just some quick code to show leaf nodes in different colors */

@ -36,8 +36,7 @@ struct Main;
struct ReportList;
extern int BLO_write_file(struct Main *mainvar, char *dir, int write_flags, struct ReportList *reports, int *thumb);
extern int BLO_write_file_mem(struct Main *mainvar, struct MemFile *compare, struct MemFile *current,
int write_flags, struct ReportList *reports);
extern int BLO_write_file_mem(struct Main *mainvar, struct MemFile *compare, struct MemFile *current, int write_flags);
extern int BLO_write_runtime(struct Main *mainvar, char *file, char *exename, struct ReportList *reports);
#define BLEN_THUMB_SIZE 128

@ -284,7 +284,7 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFil
strcpy(fd->relabase, filename);
/* clear ob->proxy_from pointers in old main */
blo_clear_proxy_pointers_from_lib(fd, oldmain);
blo_clear_proxy_pointers_from_lib(oldmain);
/* separate libraries from old main */
blo_split_main(&mainlist, oldmain);

@ -704,7 +704,7 @@ BHead *blo_firstbhead(FileData *fd)
return(bhead);
}
BHead *blo_prevbhead(FileData *fd, BHead *thisblock)
BHead *blo_prevbhead(FileData *UNUSED(fd), BHead *thisblock)
{
BHeadN *bheadn= (BHeadN *) (((char *) thisblock) - GET_INT_FROM_POINTER( &((BHeadN*)0)->bhead) );
BHeadN *prev= bheadn->prev;
@ -1155,7 +1155,7 @@ static void change_idid_adr(ListBase *mainlist, FileData *basefd, void *old, voi
* to clear that pointer before reading the undo memfile since
* the object might be removed, it is set again in reading
* if the local object still exists */
void blo_clear_proxy_pointers_from_lib(FileData *fd, Main *oldmain)
void blo_clear_proxy_pointers_from_lib(Main *oldmain)
{
Object *ob= oldmain->object.first;
@ -1442,7 +1442,7 @@ static void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, FileData *f
}
}
static void IDP_DirectLinkString(IDProperty *prop, int switch_endian, FileData *fd)
static void IDP_DirectLinkString(IDProperty *prop, FileData *fd)
{
/*since we didn't save the extra string buffer, set totallen to len.*/
prop->totallen = prop->len;
@ -1469,7 +1469,7 @@ void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
IDP_DirectLinkGroup(prop, switch_endian, fd);
break;
case IDP_STRING:
IDP_DirectLinkString(prop, switch_endian, fd);
IDP_DirectLinkString(prop, fd);
break;
case IDP_ARRAY:
IDP_DirectLinkArray(prop, switch_endian, fd);
@ -1499,7 +1499,7 @@ void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
}
/*stub function*/
void IDP_LibLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
void IDP_LibLinkProperty(IDProperty *UNUSED(prop), int UNUSED(switch_endian), FileData *UNUSED(fd))
{
}
@ -1552,7 +1552,7 @@ static void direct_link_brush(FileData *fd, Brush *brush)
brush->icon_imbuf= NULL;
}
static void direct_link_script(FileData *fd, Script *script)
static void direct_link_script(FileData *UNUSED(fd), Script *script)
{
script->id.us = 1;
SCRIPT_SET_NULL(script)
@ -2030,7 +2030,7 @@ static void lib_link_nodetree(FileData *fd, Main *main)
/* verify types for nodes and groups, all data has to be read */
/* open = 0: appending/linking, open = 1: open new file (need to clean out dynamic
* typedefs*/
static void lib_verify_nodetree(Main *main, int open)
static void lib_verify_nodetree(Main *main, int UNUSED(open))
{
Scene *sce;
Material *ma;
@ -2139,7 +2139,7 @@ typedef struct tConstraintLinkData {
ID *id;
} tConstraintLinkData;
/* callback function used to relink constraint ID-links */
static void lib_link_constraint_cb(bConstraint *con, ID **idpoin, void *userdata)
static void lib_link_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, void *userdata)
{
tConstraintLinkData *cld= (tConstraintLinkData *)userdata;
*idpoin = newlibadr(cld->fd, cld->id->lib, *idpoin);
@ -2534,7 +2534,7 @@ static void direct_link_world(FileData *fd, World *wrld)
/* ************ READ VFONT ***************** */
static void lib_link_vfont(FileData *fd, Main *main)
static void lib_link_vfont(FileData *UNUSED(fd), Main *main)
{
VFont *vf;
@ -2555,7 +2555,7 @@ static void direct_link_vfont(FileData *fd, VFont *vf)
/* ************ READ TEXT ****************** */
static void lib_link_text(FileData *fd, Main *main)
static void lib_link_text(FileData *UNUSED(fd), Main *main)
{
Text *text;
@ -5261,7 +5261,7 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main)
lib->parent= NULL;
}
static void lib_link_library(FileData *fd, Main *main)
static void lib_link_library(FileData *UNUSED(fd), Main *main)
{
Library *lib;
for(lib= main->library.first; lib; lib= lib->id.next) {
@ -6473,7 +6473,7 @@ static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype)
}
}
static void do_version_mdef_250(FileData *fd, Library *lib, Main *main)
static void do_version_mdef_250(Main *main)
{
Object *ob;
ModifierData *md;
@ -10899,7 +10899,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
do_version_mdef_250(fd, lib, main);
do_version_mdef_250(main);
/* parent type to modifier */
for(ob = main->object.first; ob; ob = ob->id.next) {
@ -11291,7 +11291,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filename)
lib_link_all(fd, bfd->main);
//do_versions_after_linking(fd, NULL, bfd->main); // XXX: not here (or even in this function at all)! this causes crashes on many files - Aligorith (July 04, 2010)
lib_verify_nodetree(bfd->main, 1);
lib_verify_nodetree(bfd->main, TRUE);
fix_relpaths_library(fd->relabase, bfd->main); /* make all relative paths, relative to the open blend file */
link_global(fd, bfd); /* as last */
@ -11776,7 +11776,7 @@ typedef struct tConstraintExpandData {
Main *mainvar;
} tConstraintExpandData;
/* callback function used to expand constraint ID-links */
static void expand_constraint_cb(bConstraint *con, ID **idpoin, void *userdata)
static void expand_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, void *userdata)
{
tConstraintExpandData *ced= (tConstraintExpandData *)userdata;
expand_doit(ced->fd, ced->mainvar, *idpoin);
@ -12461,7 +12461,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
mainl= NULL; /* blo_join_main free's mainl, cant use anymore */
lib_link_all(*fd, mainvar);
lib_verify_nodetree(mainvar, 0);
lib_verify_nodetree(mainvar, FALSE);
fix_relpaths_library(G.sce, mainvar); /* make all relative paths, relative to the open blend file */
/* give a base to loose objects. If group append, do it for objects too */

@ -114,7 +114,7 @@ FileData *blo_openblenderfile(char *name, struct ReportList *reports);
FileData *blo_openblendermemory(void *buffer, int buffersize, struct ReportList *reports);
FileData *blo_openblendermemfile(struct MemFile *memfile, struct ReportList *reports);
void blo_clear_proxy_pointers_from_lib(FileData *fd, Main *oldmain);
void blo_clear_proxy_pointers_from_lib(Main *oldmain);
void blo_make_image_pointer_map(FileData *fd, Main *oldmain);
void blo_end_image_pointer_map(FileData *fd, Main *oldmain);
void blo_add_library_pointer_map(ListBase *mainlist, FileData *fd);

@ -2530,7 +2530,7 @@ int BLO_write_file(Main *mainvar, char *dir, int write_flags, ReportList *report
}
/* return: success (1) */
int BLO_write_file_mem(Main *mainvar, MemFile *compare, MemFile *current, int write_flags, ReportList *reports)
int BLO_write_file_mem(Main *mainvar, MemFile *compare, MemFile *current, int write_flags)
{
int err;

@ -91,7 +91,7 @@
/* Get shapekey data being edited (for Action Editor -> ShapeKey mode) */
/* Note: there's a similar function in key.c (ob_get_key) */
Key *actedit_get_shapekeys (bAnimContext *ac, SpaceAction *saction)
static Key *actedit_get_shapekeys (bAnimContext *ac)
{
Scene *scene= ac->scene;
Object *ob;
@ -153,7 +153,7 @@ static short actedit_get_context (bAnimContext *ac, SpaceAction *saction)
case SACTCONT_SHAPEKEY: /* 'ShapeKey Editor' */
ac->datatype= ANIMCONT_SHAPEKEY;
ac->data= actedit_get_shapekeys(ac, saction);
ac->data= actedit_get_shapekeys(ac);
ac->mode= saction->mode;
return 1;

@ -157,7 +157,7 @@ static int pose_slide_init (bContext *C, wmOperator *op, short mode)
}
/* exiting the operator - free data */
static void pose_slide_exit (bContext *C, wmOperator *op)
static void pose_slide_exit(wmOperator *op)
{
tPoseSlideOp *pso= op->customdata;
@ -376,7 +376,7 @@ static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
}
/* apply() - perform the pose sliding based on weighting various poses */
static void pose_slide_apply (bContext *C, wmOperator *op, tPoseSlideOp *pso)
static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
{
tPChanFCurveLink *pfl;
@ -434,7 +434,7 @@ static void pose_slide_autoKeyframe (bContext *C, tPoseSlideOp *pso)
}
/* reset changes made to current pose */
static void pose_slide_reset (bContext *C, tPoseSlideOp *pso)
static void pose_slide_reset (tPoseSlideOp *pso)
{
/* wrapper around the generic call, so that custom stuff can be added later */
poseAnim_mapping_reset(&pso->pfLinks);
@ -501,7 +501,7 @@ static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *
/* initial apply for operator... */
// TODO: need to calculate percentage for initial round too...
pose_slide_apply(C, op, pso);
pose_slide_apply(C, pso);
/* depsgraph updates + redraws */
pose_slide_refresh(C, pso);
@ -528,7 +528,7 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
/* insert keyframes as required... */
pose_slide_autoKeyframe(C, pso);
pose_slide_exit(C, op);
pose_slide_exit(op);
/* done! */
return OPERATOR_FINISHED;
@ -541,13 +541,13 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
WM_cursor_restore(win);
/* reset transforms back to original state */
pose_slide_reset(C, pso);
pose_slide_reset(pso);
/* depsgraph updates + redraws */
pose_slide_refresh(C, pso);
/* clean up temp data */
pose_slide_exit(C, op);
pose_slide_exit(op);
/* cancelled! */
return OPERATOR_CANCELLED;
@ -562,10 +562,10 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
RNA_float_set(op->ptr, "percentage", pso->percentage);
/* reset transforms (to avoid accumulation errors) */
pose_slide_reset(C, pso);
pose_slide_reset(pso);
/* apply... */
pose_slide_apply(C, op, pso);
pose_slide_apply(C, pso);
}
break;
@ -579,10 +579,10 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
}
/* common code for cancel() */
static int pose_slide_cancel (bContext *C, wmOperator *op)
static int pose_slide_cancel (bContext *UNUSED(C), wmOperator *op)
{
/* cleanup and done */
pose_slide_exit(C, op);
pose_slide_exit(op);
return OPERATOR_CANCELLED;
}
@ -590,13 +590,13 @@ static int pose_slide_cancel (bContext *C, wmOperator *op)
static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *pso)
{
/* settings should have been set up ok for applying, so just apply! */
pose_slide_apply(C, op, pso);
pose_slide_apply(C, pso);
/* insert keyframes if needed */
pose_slide_autoKeyframe(C, pso);
/* cleanup and done */
pose_slide_exit(C, op);
pose_slide_exit(op);
return OPERATOR_FINISHED;
}
@ -618,7 +618,7 @@ static int pose_slide_push_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(
/* initialise data */
if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) {
pose_slide_exit(C, op);
pose_slide_exit(op);
return OPERATOR_CANCELLED;
}
else
@ -635,7 +635,7 @@ static int pose_slide_push_exec (bContext *C, wmOperator *op)
/* initialise data (from RNA-props) */
if (pose_slide_init(C, op, POSESLIDE_PUSH) == 0) {
pose_slide_exit(C, op);
pose_slide_exit(op);
return OPERATOR_CANCELLED;
}
else
@ -675,7 +675,7 @@ static int pose_slide_relax_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
/* initialise data */
if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) {
pose_slide_exit(C, op);
pose_slide_exit(op);
return OPERATOR_CANCELLED;
}
else
@ -692,7 +692,7 @@ static int pose_slide_relax_exec (bContext *C, wmOperator *op)
/* initialise data (from RNA-props) */
if (pose_slide_init(C, op, POSESLIDE_RELAX) == 0) {
pose_slide_exit(C, op);
pose_slide_exit(op);
return OPERATOR_CANCELLED;
}
else
@ -732,7 +732,7 @@ static int pose_slide_breakdown_invoke (bContext *C, wmOperator *op, wmEvent *UN
/* initialise data */
if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) {
pose_slide_exit(C, op);
pose_slide_exit(op);
return OPERATOR_CANCELLED;
}
else
@ -749,7 +749,7 @@ static int pose_slide_breakdown_exec (bContext *C, wmOperator *op)
/* initialise data (from RNA-props) */
if (pose_slide_init(C, op, POSESLIDE_BREAKDOWN) == 0) {
pose_slide_exit(C, op);
pose_slide_exit(op);
return OPERATOR_CANCELLED;
}
else

@ -492,7 +492,7 @@ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxle
void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval);
uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2);
void uiDefAutoButsRNA(const struct bContext *C, uiLayout *layout, struct PointerRNA *ptr, int columns);
void uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int columns);
/* Links
*
@ -680,17 +680,17 @@ void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA
char *newop, char *openop, char *unlinkop);
void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
char *newop, char *openop, char *unlinkop, int rows, int cols);
void uiTemplateAnyID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, char *propname,
char *proptypename, char *text);
void uiTemplatePathBuilder(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, char *propname,
struct PointerRNA *root_ptr, char *text);
uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr);
uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr);
void uiTemplatePreview(uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot);
void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, char *propname);
void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, char *propname);
void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, char *propname);
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, char *propname, int type, int levels, int brush);
void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, char *propname, int value_slider, int lock, int lock_luminosity, int cubic);
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, char *propname,

@ -441,7 +441,7 @@ void uiCenteredBoundsBlock(uiBlock *block, int addval)
/* link line drawing is not part of buttons or theme.. so we stick with it here */
static void ui_draw_linkline(uiBut *but, uiLinkLine *line)
static void ui_draw_linkline(uiLinkLine *line)
{
rcti rect;
@ -470,7 +470,7 @@ static void ui_draw_links(uiBlock *block)
if(but->type==LINK && but->link) {
line= but->link->lines.first;
while(line) {
ui_draw_linkline(but, line);
ui_draw_linkline(line);
line= line->next;
}
}
@ -748,7 +748,7 @@ void uiDrawBlock(const bContext *C, uiBlock *block)
if(block->flag & UI_BLOCK_LOOP)
ui_draw_menu_back(&style, block, &rect);
else if(block->panel)
ui_draw_aligned_panel(ar, &style, block, &rect);
ui_draw_aligned_panel(&style, block, &rect);
/* widgets */
for(but= block->buttons.first; but; but= but->next) {
@ -835,7 +835,7 @@ static void ui_is_but_sel(uiBut *but)
/* XXX 2.50 no links supported yet */
static int uibut_contains_pt(uiBut *but, short *mval)
static int uibut_contains_pt(uiBut *UNUSED(but), short *UNUSED(mval))
{
return 0;
@ -1093,12 +1093,12 @@ static void ui_do_active_linklines(uiBlock *block, short *mval)
if(line==act) {
if((line->flag & UI_SELECT)==0) {
line->flag |= UI_SELECT;
ui_draw_linkline(but, line);
ui_draw_linkline(line);
}
}
else if(line->flag & UI_SELECT) {
line->flag &= ~UI_SELECT;
ui_draw_linkline(but, line);
ui_draw_linkline(line);
}
line= line->next;
}
@ -2182,7 +2182,7 @@ int ui_but_can_align(uiBut *but)
return !ELEM3(but->type, LABEL, OPTION, OPTIONN);
}
static void ui_block_do_align_but(uiBlock *block, uiBut *first, int nr)
static void ui_block_do_align_but(uiBut *first, int nr)
{
uiBut *prev, *but=NULL, *next;
int flag= 0, cols=0, rows=0;
@ -2316,7 +2316,7 @@ void ui_block_do_align(uiBlock *block)
for(but=block->buttons.first; but;) {
if(but->alignnr) {
nr= but->alignnr;
ui_block_do_align_but(block, but, nr);
ui_block_do_align_but(but, nr);
/* skip with same number */
for(; but && but->alignnr == nr; but=but->next);

@ -460,7 +460,7 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel)
/* ************** SPECIAL BUTTON DRAWING FUNCTIONS ************* */
void ui_draw_but_IMAGE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect)
void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *UNUSED(but), uiWidgetColors *UNUSED(wcol), rcti *rect)
{
extern char datatoc_splash_png[];
extern int datatoc_splash_png_size;
@ -747,7 +747,7 @@ void histogram_draw_one(float r, float g, float b, float alpha, float x, float y
glDisable(GL_LINE_SMOOTH);
}
void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *recti)
void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
{
Histogram *hist = (Histogram *)but->poin;
int res = hist->x_resolution;
@ -800,7 +800,7 @@ void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *
draw_scope_end(&rect, scissor);
}
void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *recti)
void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
{
Scopes *scopes = (Scopes *)but->poin;
rctf rect;
@ -1023,7 +1023,7 @@ void vectorscope_draw_target(float centerx, float centery, float diam, float r,
glEnd();
}
void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *recti)
void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
{
Scopes *scopes = (Scopes *)but->poin;
rctf rect;
@ -1105,7 +1105,7 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti
glDisable(GL_BLEND);
}
void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *wcol, rcti *rect)
void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
{
ColorBand *coba;
CBData *cbd;

@ -331,7 +331,7 @@ static void vicon_editmode_hlt_draw(int x, int y, int w, int h, float alpha)
viconutil_draw_points(pts, 3, 1);
}
static void vicon_editmode_dehlt_draw(int x, int y, int w, int h, float alpha)
static void vicon_editmode_dehlt_draw(int x, int y, int w, int h, float UNUSED(alpha))
{
GLint pts[3][2];
@ -346,7 +346,7 @@ static void vicon_editmode_dehlt_draw(int x, int y, int w, int h, float alpha)
viconutil_draw_points(pts, 3, 1);
}
static void vicon_disclosure_tri_right_draw(int x, int y, int w, int h, float alpha)
static void vicon_disclosure_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha)
{
GLint pts[3][2];
int cx = x+w/2;
@ -371,7 +371,7 @@ static void vicon_disclosure_tri_right_draw(int x, int y, int w, int h, float al
viconutil_draw_lineloop_smooth(pts, 3);
}
static void vicon_small_tri_right_draw(int x, int y, int w, int h, float alpha)
static void vicon_small_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha)
{
GLint pts[3][2];
int cx = x+w/2-4;
@ -393,7 +393,7 @@ static void vicon_small_tri_right_draw(int x, int y, int w, int h, float alpha)
glShadeModel(GL_FLAT);
}
static void vicon_disclosure_tri_down_draw(int x, int y, int w, int h, float alpha)
static void vicon_disclosure_tri_down_draw(int x, int y, int w, int UNUSED(h), float alpha)
{
GLint pts[3][2];
int cx = x+w/2;
@ -418,7 +418,7 @@ static void vicon_disclosure_tri_down_draw(int x, int y, int w, int h, float alp
viconutil_draw_lineloop_smooth(pts, 3);
}
static void vicon_move_up_draw(int x, int y, int w, int h, float alpha)
static void vicon_move_up_draw(int x, int y, int w, int h, float UNUSED(alpha))
{
int d=-2;
@ -436,7 +436,7 @@ static void vicon_move_up_draw(int x, int y, int w, int h, float alpha)
glDisable(GL_LINE_SMOOTH);
}
static void vicon_move_down_draw(int x, int y, int w, int h, float alpha)
static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha))
{
int d=2;
@ -843,7 +843,7 @@ static void icon_set_image(bContext *C, ID *id, PreviewImage* prv_img, int miple
prv_img->w[miplevel], prv_img->h[miplevel]);
}
static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, int rh, unsigned int *rect, float alpha, float *rgb)
static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), int rw, int rh, unsigned int *rect, float alpha, float *rgb)
{
/* modulate color */
if(alpha != 1.0f)
@ -895,7 +895,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw,
}
}
static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int iw, int ih, float alpha, float *rgb)
static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int UNUSED(iw), int ih, float alpha, float *rgb)
{
float x1, x2, y1, y2;
@ -938,7 +938,7 @@ static int preview_size(int miplevel)
return 0;
}
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, int miplevel, int draw_size, int nocreate)
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, int miplevel, int draw_size, int UNUSED(nocreate))
{
Icon *icon = NULL;
DrawInfo *di = NULL;

@ -441,7 +441,7 @@ void autocomplete_end(struct AutoComplete *autocpl, char *autoname);
/* interface_panel.c */
extern int ui_handler_panel_region(struct bContext *C, struct wmEvent *event);
extern void ui_draw_aligned_panel(struct ARegion *ar, struct uiStyle *style, uiBlock *block, rcti *rect);
extern void ui_draw_aligned_panel(struct uiStyle *style, uiBlock *block, rcti *rect);
/* interface_draw.c */
extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);

@ -434,7 +434,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, char *name, int icon
uiBlockSetCurLayout(block, layout);
}
static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, char *uiname, int x, int y, int w, int h, int icon_only)
static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, char *uiname, int h, int icon_only)
{
uiBut *but;
EnumPropertyItem *item;
@ -956,7 +956,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
}
/* expanded enum */
else if(type == PROP_ENUM && (expand || RNA_property_flag(prop) & PROP_ENUM_FLAG))
ui_item_enum_expand(layout, block, ptr, prop, name, 0, 0, w, h, icon_only);
ui_item_enum_expand(layout, block, ptr, prop, name, h, icon_only);
/* property with separate label */
else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) {
but= ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag);

@ -316,7 +316,7 @@ void uiPanelPush(uiBlock *block)
glTranslatef((float)block->panel->ofsx, (float)block->panel->ofsy, 0.0);
}
void uiPanelPop(uiBlock *block)
void uiPanelPop(uiBlock *UNUSED(block))
{
glPopMatrix();
}
@ -425,7 +425,7 @@ static void ui_draw_panel_dragwidget(rctf *rect)
}
static void ui_draw_aligned_panel_header(ARegion *ar, uiStyle *style, uiBlock *block, rcti *rect, char dir)
static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *rect, char dir)
{
Panel *panel= block->panel;
rcti hrect;
@ -468,7 +468,7 @@ static void rectf_scale(rctf *rect, float scale)
}
/* panel integrated in buttonswindow, tool/property lists etc */
void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *rect)
void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
{
Panel *panel= block->panel;
rcti headrect;
@ -499,7 +499,7 @@ void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *re
/* horizontal title */
if(!(panel->flag & PNL_CLOSEDX)) {
ui_draw_aligned_panel_header(ar, style, block, &headrect, 'h');
ui_draw_aligned_panel_header(style, block, &headrect, 'h');
/* itemrect smaller */
itemrect.xmax= headrect.xmax - 5.0f/block->aspect;
@ -518,7 +518,7 @@ void ui_draw_aligned_panel(ARegion *ar, uiStyle *style, uiBlock *block, rcti *re
}
else if(panel->flag & PNL_CLOSEDX) {
/* draw vertical title */
ui_draw_aligned_panel_header(ar, style, block, &headrect, 'v');
ui_draw_aligned_panel_header(style, block, &headrect, 'v');
}
/* an open panel */
else {

@ -306,7 +306,7 @@ typedef struct uiTooltipData {
int toth, spaceh, lineh;
} uiTooltipData;
static void ui_tooltip_region_draw(const bContext *C, ARegion *ar)
static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
{
uiTooltipData *data= ar->regiondata;
rcti bbox= data->bbox;
@ -328,7 +328,7 @@ static void ui_tooltip_region_draw(const bContext *C, ARegion *ar)
}
}
static void ui_tooltip_region_free(ARegion *ar)
static void ui_tooltip_region_free_cb(ARegion *ar)
{
uiTooltipData *data;
@ -455,8 +455,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
ar= ui_add_temporary_region(CTX_wm_screen(C));
memset(&type, 0, sizeof(ARegionType));
type.draw= ui_tooltip_region_draw;
type.free= ui_tooltip_region_free;
type.draw= ui_tooltip_region_draw_cb;
type.free= ui_tooltip_region_free_cb;
ar->type= &type;
/* set font, get bb */
@ -832,7 +832,7 @@ void ui_searchbox_autocomplete(bContext *C, ARegion *ar, uiBut *but, char *str)
}
}
static void ui_searchbox_region_draw(const bContext *C, ARegion *ar)
static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
{
uiSearchboxData *data= ar->regiondata;
@ -840,7 +840,7 @@ static void ui_searchbox_region_draw(const bContext *C, ARegion *ar)
wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f);
if(!data->noback)
ui_draw_search_back(U.uistyles.first, NULL, &data->bbox);
ui_draw_search_back(NULL, NULL, &data->bbox); /* style not used yet */
/* draw text */
if(data->items.totitem) {
@ -899,7 +899,7 @@ static void ui_searchbox_region_draw(const bContext *C, ARegion *ar)
}
}
static void ui_searchbox_region_free(ARegion *ar)
static void ui_searchbox_region_free_cb(ARegion *ar)
{
uiSearchboxData *data= ar->regiondata;
int a;
@ -931,8 +931,8 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
ar= ui_add_temporary_region(CTX_wm_screen(C));
memset(&type, 0, sizeof(ARegionType));
type.draw= ui_searchbox_region_draw;
type.free= ui_searchbox_region_free;
type.draw= ui_searchbox_region_draw_cb;
type.free= ui_searchbox_region_free_cb;
ar->type= &type;
/* create searchbox data */
@ -1418,7 +1418,7 @@ void ui_popup_block_free(bContext *C, uiPopupBlockHandle *handle)
/***************************** Menu Button ***************************/
static void ui_block_func_MENUSTR(bContext *C, uiLayout *layout, void *arg_str)
static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *arg_str)
{
uiBlock *block= uiLayoutGetBlock(layout);
uiPopupBlockHandle *handle= block->handle;
@ -1500,7 +1500,7 @@ static void ui_block_func_MENUSTR(bContext *C, uiLayout *layout, void *arg_str)
menudata_free(md);
}
void ui_block_func_ICONROW(bContext *C, uiLayout *layout, void *arg_but)
void ui_block_func_ICONROW(bContext *UNUSED(C), uiLayout *layout, void *arg_but)
{
uiBlock *block= uiLayoutGetBlock(layout);
uiPopupBlockHandle *handle= block->handle;
@ -1514,7 +1514,7 @@ void ui_block_func_ICONROW(bContext *C, uiLayout *layout, void *arg_but)
&handle->retvalue, (float)a, 0.0, 0, 0, "");
}
void ui_block_func_ICONTEXTROW(bContext *C, uiLayout *layout, void *arg_but)
void ui_block_func_ICONTEXTROW(bContext *UNUSED(C), uiLayout *layout, void *arg_but)
{
uiBlock *block= uiLayoutGetBlock(layout);
uiPopupBlockHandle *handle= block->handle;
@ -1642,7 +1642,7 @@ void ui_update_block_buts_rgb(uiBlock *block, float *rgb)
}
}
static void do_picker_rna_cb(bContext *C, void *bt1, void *unused)
static void do_picker_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
{
uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle;
@ -1659,7 +1659,7 @@ static void do_picker_rna_cb(bContext *C, void *bt1, void *unused)
popup->menuretval= UI_RETURN_UPDATE;
}
static void do_hsv_rna_cb(bContext *C, void *bt1, void *arg_dummy)
static void do_hsv_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
{
uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle;
@ -1674,7 +1674,7 @@ static void do_hsv_rna_cb(bContext *C, void *bt1, void *arg_dummy)
popup->menuretval= UI_RETURN_UPDATE;
}
static void do_hex_rna_cb(bContext *C, void *bt1, void *hexcl)
static void do_hex_rna_cb(bContext *UNUSED(C), void *bt1, void *hexcl)
{
uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle;
@ -1695,7 +1695,7 @@ static void do_hex_rna_cb(bContext *C, void *bt1, void *hexcl)
popup->menuretval= UI_RETURN_UPDATE;
}
static void close_popup_cb(bContext *C, void *bt1, void *arg)
static void close_popup_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
{
uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle;
@ -1735,7 +1735,7 @@ static void picker_new_hide_reveal(uiBlock *block, short colormode)
}
}
static void do_picker_new_mode_cb(bContext *C, void *bt1, void *dummy)
static void do_picker_new_mode_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
{
uiBut *bt= bt1;
short colormode= ui_get_but_val(bt);
@ -1886,7 +1886,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
}
static int ui_picker_small_wheel(const bContext *C, uiBlock *block, wmEvent *event)
static int ui_picker_small_wheel_cb(const bContext *UNUSED(C), uiBlock *block, wmEvent *event)
{
float add= 0.0f;
@ -1945,7 +1945,7 @@ uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_bu
block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN;
uiBoundsBlock(block, 10);
block->block_event_func= ui_picker_small_wheel;
block->block_event_func= ui_picker_small_wheel_cb;
/* and lets go */
block->direction= UI_TOP;

@ -491,7 +491,7 @@ void uiTemplateIDPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, char *p
* - propname: property identifier for property that ID-pointer gets stored to
* - proptypename: property identifier for property used to determine the type of ID-pointer that can be used
*/
void uiTemplateAnyID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, char *proptypename, char *text)
void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, char *propname, char *proptypename, char *text)
{
PropertyRNA *propID, *propType;
uiLayout *row;
@ -536,7 +536,7 @@ void uiTemplateAnyID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propn
* - propname: property identifier for property that path gets stored to
* - root_ptr: struct that path gets built from
*/
void uiTemplatePathBuilder(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, PointerRNA *root_ptr, char *text)
void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, char *propname, PointerRNA *UNUSED(root_ptr), char *text)
{
PropertyRNA *propPath;
uiLayout *row;
@ -817,7 +817,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
#define REMAKEIPO 8
#define B_DIFF 9
void do_constraint_panels(bContext *C, void *arg, int event)
void do_constraint_panels(bContext *C, void *UNUSED(arg), int event)
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
@ -853,7 +853,7 @@ void do_constraint_panels(bContext *C, void *arg, int event)
// XXX allqueue(REDRAWBUTSEDIT, 0);
}
static void constraint_active_func(bContext *C, void *ob_v, void *con_v)
static void constraint_active_func(bContext *UNUSED(C), void *ob_v, void *con_v)
{
ED_object_constraint_set_active(ob_v, con_v);
}
@ -1142,7 +1142,7 @@ typedef struct RNAUpdateCb {
PropertyRNA *prop;
} RNAUpdateCb;
static void rna_update_cb(bContext *C, void *arg_cb, void *arg_unused)
static void rna_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg))
{
RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb;
@ -1319,7 +1319,7 @@ void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, char *propname, int
/********************* Histogram Template ************************/
void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, char *propname, int expand)
void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, char *propname)
{
PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
PointerRNA cptr;
@ -1358,7 +1358,7 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, char *propname, int
/********************* Waveform Template ************************/
void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, char *propname, int expand)
void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, char *propname)
{
PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
PointerRNA cptr;
@ -1394,7 +1394,7 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, char *propname, int e
/********************* Vectorscope Template ************************/
void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, char *propname, int expand)
void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, char *propname)
{
PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
PointerRNA cptr;
@ -1432,7 +1432,7 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, char *propname, in
/********************* CurveMapping Template ************************/
static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *unused)
static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *UNUSED(arg))
{
CurveMapping *cumap = cumap_v;
float d;
@ -1450,7 +1450,7 @@ static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *unused)
ED_region_tag_redraw(CTX_wm_region(C));
}
static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *unused)
static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *UNUSED(unused))
{
CurveMapping *cumap = cumap_v;
float d, d1;
@ -1487,7 +1487,7 @@ static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *unused)
ED_region_tag_redraw(CTX_wm_region(C));
}
static void curvemap_buttons_setclip(bContext *C, void *cumap_v, void *unused)
static void curvemap_buttons_setclip(bContext *UNUSED(C), void *cumap_v, void *UNUSED(arg))
{
CurveMapping *cumap = cumap_v;
@ -1607,7 +1607,7 @@ static uiBlock *curvemap_brush_tools_func(bContext *C, struct ARegion *ar, void
return block;
}
static void curvemap_buttons_redraw(bContext *C, void *arg1, void *arg2)
static void curvemap_buttons_redraw(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
{
ED_region_tag_redraw(CTX_wm_region(C));
}
@ -2200,7 +2200,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propna
/************************* Operator Search Template **************************/
static void operator_call_cb(bContext *C, void *arg1, void *arg2)
static void operator_call_cb(bContext *C, void *UNUSED(arg1), void *arg2)
{
wmOperatorType *ot= arg2;
@ -2208,7 +2208,7 @@ static void operator_call_cb(bContext *C, void *arg1, void *arg2)
WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL);
}
static void operator_search_cb(const bContext *C, void *arg, char *str, uiSearchItems *items)
static void operator_search_cb(const bContext *C, void *UNUSED(arg), char *str, uiSearchItems *items)
{
wmOperatorType *ot = WM_operatortype_first();
@ -2255,7 +2255,7 @@ void uiTemplateOperatorSearch(uiLayout *layout)
#define B_STOPANIM 3
#define B_STOPCOMPO 4
static void do_running_jobs(bContext *C, void *arg, int event)
static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
{
switch(event) {
case B_STOPRENDER:

@ -131,7 +131,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
return but;
}
void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr, int columns)
void uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int columns)
{
uiLayout *split, *col;
int flag;

@ -744,7 +744,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
#define PREVIEW_PAD 4
static void widget_draw_preview(BIFIconID icon, float aspect, float alpha, rcti *rect)
static void widget_draw_preview(BIFIconID icon, float aspect, float UNUSED(alpha), rcti *rect)
{
int w, h, x, y, size;
@ -1492,7 +1492,7 @@ static void widget_state_label(uiWidgetType *wt, int state)
}
static void widget_state_nothing(uiWidgetType *wt, int state)
static void widget_state_nothing(uiWidgetType *wt, int UNUSED(state))
{
wt->wcol= *(wt->wcol_theme);
}
@ -1949,7 +1949,7 @@ static void ui_draw_but_HSV_v(uiBut *but, rcti *rect)
/* ************ separator, for menus etc ***************** */
static void ui_draw_separator(uiBut *but, rcti *rect, uiWidgetColors *wcol)
static void ui_draw_separator(rcti *rect, uiWidgetColors *wcol)
{
int y = rect->ymin + (rect->ymax - rect->ymin)/2 - 1;
unsigned char col[4];
@ -2121,7 +2121,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat
}
}
static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
{
rcti rect1;
double value;
@ -2182,7 +2182,7 @@ static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
uiWidgetScrollDraw(wcol, rect, &rect1, state);
}
static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{
rcti rect_prog = *rect, rect_bar = *rect;
float value = but->a1;
@ -2208,7 +2208,7 @@ static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int
rect->xmin -= 6;
}
static void widget_link(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_link(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{
if(but->flag & UI_SELECT) {
@ -2362,7 +2362,7 @@ static void widget_textbut(uiWidgetColors *wcol, rcti *rect, int state, int roun
}
static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{
uiWidgetBase wtb;
@ -2380,7 +2380,7 @@ static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int state, int roun
rect->xmax -= (rect->ymax-rect->ymin);
}
static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{
uiWidgetBase wtb;
@ -2393,7 +2393,7 @@ static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int state, int
widgetbase_draw(&wtb, wcol);
}
static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
{
if(state & UI_ACTIVE) {
uiWidgetBase wtb;
@ -2408,7 +2408,7 @@ static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int
}
}
static void widget_menu_itembut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_menu_itembut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{
uiWidgetBase wtb;
@ -2421,7 +2421,7 @@ static void widget_menu_itembut(uiWidgetColors *wcol, rcti *rect, int state, int
widgetbase_draw(&wtb, wcol);
}
static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{
uiWidgetBase wtb;
@ -2434,7 +2434,7 @@ static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int state, int
widgetbase_draw(&wtb, wcol);
}
static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
{
uiWidgetBase wtb;
rcti recttemp= *rect;
@ -2467,7 +2467,7 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int ro
}
static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{
uiWidgetBase wtb;
@ -2480,7 +2480,7 @@ static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int state, int rou
}
static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{
uiWidgetBase wtb;
char old_col[3];
@ -2508,7 +2508,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state,
VECCOPY(wcol->inner, old_col);
}
static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_but(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{
uiWidgetBase wtb;
@ -2521,7 +2521,7 @@ static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundbox
}
static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{
uiWidgetBase wtb;
float rad= 5.0f; //0.5f*(rect->ymax - rect->ymin);
@ -2786,7 +2786,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect);
break;
case SEPR:
ui_draw_separator(but, rect, &tui->wcol_menu_item);
ui_draw_separator(rect, &tui->wcol_menu_item);
break;
default:
@ -2972,7 +2972,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
}
}
void ui_draw_menu_back(uiStyle *style, uiBlock *block, rcti *rect)
void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
{
uiWidgetType *wt= widget_type(UI_WTYPE_MENU_BACK);
@ -2984,7 +2984,7 @@ void ui_draw_menu_back(uiStyle *style, uiBlock *block, rcti *rect)
}
void ui_draw_search_back(uiStyle *style, uiBlock *block, rcti *rect)
void ui_draw_search_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
{
uiWidgetType *wt= widget_type(UI_WTYPE_BOX);

@ -1104,14 +1104,14 @@ static EditVert *editmesh_get_x_mirror_vert_topo(Object *ob, struct EditMesh *em
if(poinval != -1)
return (EditVert *)(poinval);
return NULL;
}
}
EditVert *editmesh_get_x_mirror_vert(Object *ob, struct EditMesh *em, EditVert *eve, float *co, int index)
{
if (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_TOPO) {
return editmesh_get_x_mirror_vert_topo(ob, em, eve, index);
} else {
return editmesh_get_x_mirror_vert_spacial(ob, em, eve->co);
return editmesh_get_x_mirror_vert_spacial(ob, em, co);
}
}

@ -282,7 +282,7 @@ void OBJECT_OT_material_slot_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int material_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
static int material_slot_remove_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;

@ -2463,7 +2463,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
return 0;
}
static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
bScreen *screen= CTX_wm_screen(C);

@ -4986,10 +4986,10 @@ static int paint_radial_control_exec(bContext *C, wmOperator *op)
Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint);
float zoom;
int ret;
char str[256];
char str[64];
get_imapaint_zoom(C, &zoom, &zoom);
ret = brush_radial_control_exec(op, brush, 1.0f / zoom);
WM_radial_control_string(op, str, 256);
WM_radial_control_string(op, str, sizeof(str));
WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);
@ -5333,8 +5333,8 @@ static int texture_paint_radial_control_exec(bContext *C, wmOperator *op)
{
Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->imapaint.paint);
int ret = brush_radial_control_exec(op, brush, 1);
char str[256];
WM_radial_control_string(op, str, 256);
char str[64];
WM_radial_control_string(op, str, sizeof(str));
WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush);

@ -76,7 +76,7 @@
/* -------------- */
static void do_graph_region_buttons(bContext *C, void *arg, int event)
static void do_graph_region_buttons(bContext *UNUSED(C), void *UNUSED(arg), int event)
{
//Scene *scene= CTX_data_scene(C);
@ -116,7 +116,7 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **
return 1;
}
static int graph_panel_poll(const bContext *C, PanelType *pt)
static int graph_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
return graph_panel_context(C, NULL, NULL);
}
@ -288,7 +288,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa)
#define B_IPO_DEPCHANGE 10
static void do_graph_region_driver_buttons(bContext *C, void *arg, int event)
static void do_graph_region_driver_buttons(bContext *C, void *UNUSED(arg), int event)
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
@ -310,7 +310,7 @@ static void do_graph_region_driver_buttons(bContext *C, void *arg, int event)
}
/* callback to remove the active driver */
static void driver_remove_cb (bContext *C, void *ale_v, void *dummy_v)
static void driver_remove_cb (bContext *UNUSED(C), void *ale_v, void *UNUSED(arg))
{
bAnimListElem *ale= (bAnimListElem *)ale_v;
ID *id= ale->id;
@ -325,7 +325,7 @@ static void driver_remove_cb (bContext *C, void *ale_v, void *dummy_v)
}
/* callback to add a target variable to the active driver */
static void driver_add_var_cb (bContext *C, void *driver_v, void *dummy_v)
static void driver_add_var_cb (bContext *UNUSED(C), void *driver_v, void *UNUSED(arg))
{
ChannelDriver *driver= (ChannelDriver *)driver_v;
@ -334,7 +334,7 @@ static void driver_add_var_cb (bContext *C, void *driver_v, void *dummy_v)
}
/* callback to remove target variable from active driver */
static void driver_delete_var_cb (bContext *C, void *driver_v, void *dvar_v)
static void driver_delete_var_cb (bContext *UNUSED(C), void *driver_v, void *dvar_v)
{
ChannelDriver *driver= (ChannelDriver *)driver_v;
DriverVar *dvar= (DriverVar *)dvar_v;
@ -344,7 +344,7 @@ static void driver_delete_var_cb (bContext *C, void *driver_v, void *dvar_v)
}
/* callback to reset the driver's flags */
static void driver_update_flags_cb (bContext *C, void *fcu_v, void *dummy_v)
static void driver_update_flags_cb (bContext *UNUSED(C), void *fcu_v, void *UNUSED(arg))
{
FCurve *fcu= (FCurve *)fcu_v;
ChannelDriver *driver= fcu->driver;
@ -355,7 +355,7 @@ static void driver_update_flags_cb (bContext *C, void *fcu_v, void *dummy_v)
}
/* drivers panel poll */
static int graph_panel_drivers_poll(const bContext *C, PanelType *pt)
static int graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceIpo *sipo= CTX_wm_space_graph(C);
@ -365,9 +365,8 @@ static int graph_panel_drivers_poll(const bContext *C, PanelType *pt)
return graph_panel_context(C, NULL, NULL);
}
/* settings for 'single property' driver variable type */
static void graph_panel_driverVar__singleProp(const bContext *C, uiLayout *layout, ID *id, DriverVar *dvar)
static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar= &dvar->targets[0];
PointerRNA dtar_ptr;
@ -379,7 +378,7 @@ static void graph_panel_driverVar__singleProp(const bContext *C, uiLayout *layou
/* Target ID */
row= uiLayoutRow(layout, 0);
uiTemplateAnyID(row, (bContext *)C, &dtar_ptr, "id", "id_type", "Prop:");
uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", "Prop:");
/* Target Property */
// TODO: make this less technical...
@ -392,12 +391,12 @@ static void graph_panel_driverVar__singleProp(const bContext *C, uiLayout *layou
col= uiLayoutColumn(layout, 1);
block= uiLayoutGetBlock(col);
/* rna path */
uiTemplatePathBuilder(col, (bContext *)C, &dtar_ptr, "data_path", &root_ptr, "Path");
uiTemplatePathBuilder(col, &dtar_ptr, "data_path", &root_ptr, "Path");
}
}
/* settings for 'rotation difference' driver variable type */
static void graph_panel_driverVar__rotDiff(const bContext *C, uiLayout *layout, ID *id, DriverVar *dvar)
static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar= &dvar->targets[0];
DriverTarget *dtar2= &dvar->targets[1];
@ -412,7 +411,7 @@ static void graph_panel_driverVar__rotDiff(const bContext *C, uiLayout *layout,
/* Bone 1 */
col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar_ptr, "id", "id_type", "Bone 1:");
uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", "Bone 1:");
if (dtar->id && ob1->pose) {
PointerRNA tar_ptr;
@ -422,7 +421,7 @@ static void graph_panel_driverVar__rotDiff(const bContext *C, uiLayout *layout,
}
col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar2_ptr, "id", "id_type", "Bone 2:");
uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", "Bone 2:");
if (dtar2->id && ob2->pose) {
PointerRNA tar_ptr;
@ -433,7 +432,7 @@ static void graph_panel_driverVar__rotDiff(const bContext *C, uiLayout *layout,
}
/* settings for 'location difference' driver variable type */
static void graph_panel_driverVar__locDiff(const bContext *C, uiLayout *layout, ID *id, DriverVar *dvar)
static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar= &dvar->targets[0];
DriverTarget *dtar2= &dvar->targets[1];
@ -448,7 +447,7 @@ static void graph_panel_driverVar__locDiff(const bContext *C, uiLayout *layout,
/* Bone 1 */
col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar_ptr, "id", "id_type", "Ob/Bone 1:");
uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", "Ob/Bone 1:");
if (dtar->id && ob1->pose) {
PointerRNA tar_ptr;
@ -460,7 +459,7 @@ static void graph_panel_driverVar__locDiff(const bContext *C, uiLayout *layout,
uiItemR(col, &dtar_ptr, "use_local_space_transform", 0, NULL, 0);
col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar2_ptr, "id", "id_type", "Ob/Bone 2:");
uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", "Ob/Bone 2:");
if (dtar2->id && ob2->pose) {
PointerRNA tar_ptr;
@ -473,7 +472,7 @@ static void graph_panel_driverVar__locDiff(const bContext *C, uiLayout *layout,
}
/* settings for 'transform channel' driver variable type */
static void graph_panel_driverVar__transChan(const bContext *C, uiLayout *layout, ID *id, DriverVar *dvar)
static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar= &dvar->targets[0];
Object *ob = (Object *)dtar->id;
@ -485,7 +484,7 @@ static void graph_panel_driverVar__transChan(const bContext *C, uiLayout *layout
/* properties */
col= uiLayoutColumn(layout, 1);
uiTemplateAnyID(col, (bContext *)C, &dtar_ptr, "id", "id_type", "Ob/Bone:");
uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", "Ob/Bone:");
if (dtar->id && ob->pose) {
PointerRNA tar_ptr;
@ -606,16 +605,16 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* controls to draw depends on the type of variable */
switch (dvar->type) {
case DVAR_TYPE_SINGLE_PROP: /* single property */
graph_panel_driverVar__singleProp(C, box, ale->id, dvar);
graph_panel_driverVar__singleProp(box, ale->id, dvar);
break;
case DVAR_TYPE_ROT_DIFF: /* rotational difference */
graph_panel_driverVar__rotDiff(C, box, ale->id, dvar);
graph_panel_driverVar__rotDiff(box, ale->id, dvar);
break;
case DVAR_TYPE_LOC_DIFF: /* location difference */
graph_panel_driverVar__locDiff(C, box, ale->id, dvar);
graph_panel_driverVar__locDiff(box, ale->id, dvar);
break;
case DVAR_TYPE_TRANSFORM_CHAN: /* transform channel */
graph_panel_driverVar__transChan(C, box, ale->id, dvar);
graph_panel_driverVar__transChan(box, ale->id, dvar);
break;
}
@ -642,7 +641,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
#define B_FMODIFIER_REDRAW 20
static void do_graph_region_modifier_buttons(bContext *C, void *arg, int event)
static void do_graph_region_modifier_buttons(bContext *C, void *UNUSED(arg), int event)
{
switch (event) {
case B_REDR:

@ -179,7 +179,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn)
}
static void recent_files_menu(const bContext *C, Menu *menu)
static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
{
struct RecentFile *recent;
uiLayout *layout= menu->layout;
@ -200,7 +200,7 @@ void recent_files_menu_register()
mt= MEM_callocN(sizeof(MenuType), "spacetype info menu recent files");
strcpy(mt->idname, "INFO_MT_file_open_recent");
strcpy(mt->label, "Open Recent...");
mt->draw= recent_files_menu;
mt->draw= recent_files_menu_draw;
WM_menutype_add(mt);
}

@ -72,7 +72,7 @@
/* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
void node_buts_group(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
void node_buts_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
uiTemplateIDBrowse(layout, C, ptr, "node_tree", NULL, NULL, "");
}
@ -297,7 +297,7 @@ static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
node->menunr= 0;
}
static void node_shader_buts_material(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node= ptr->data;
uiLayout *col;
@ -343,7 +343,7 @@ static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), Po
uiItemR(layout, ptr, "operation", 0, "", 0);
}
static void node_shader_buts_geometry(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
PointerRNA obptr= CTX_data_pointer_get(C, "active_object");
uiLayout *col;
@ -362,7 +362,7 @@ static void node_shader_buts_geometry(uiLayout *layout, bContext *UNUSED(C), Poi
}
}
static void node_shader_buts_dynamic(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
uiBlock *block= uiLayoutAbsoluteBlock(layout);
@ -457,7 +457,7 @@ static void node_shader_set_butfunc(bNodeType *ntype)
/* ****************** BUTTON CALLBACKS FOR COMPOSITE NODES ***************** */
static void node_composit_buts_image(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
uiLayout *col;
bNode *node= ptr->data;
@ -491,7 +491,7 @@ static void node_composit_buts_image(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemR(col, ptr, "layer", 0, NULL, 0);
}
static void node_composit_buts_renderlayers(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node= ptr->data;
uiLayout *col, *row;
@ -1210,7 +1210,7 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
}
}
static void node_texture_buts_image(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_texture_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL);
}

@ -1421,7 +1421,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
}
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
uiDefAutoButsRNA(C, pa->layout, &ptr, 2);
uiDefAutoButsRNA(pa->layout, &ptr, 2);
}
#endif // XXX not used

@ -114,7 +114,7 @@ static void view3d_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOper
op->layout= NULL;
}
else
uiDefAutoButsRNA(C, pa->layout, &ptr, 1);
uiDefAutoButsRNA(pa->layout, &ptr, 1);
}
static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa)

@ -50,7 +50,7 @@
/* allocates PoseTree, and links that to root bone/channel */
/* Note: detecting the IK chain is duplicate code... in drawarmature.c and in transform_conversions.c */
static void initialize_posetree(struct Object *ob, bPoseChannel *pchan_tip)
static void initialize_posetree(struct Object *UNUSED(ob), bPoseChannel *pchan_tip)
{
bPoseChannel *curchan, *pchan_root=NULL, *chanlist[256], **oldchan;
PoseTree *tree;

@ -287,7 +287,6 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX);
func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
@ -297,7 +296,6 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
@ -343,17 +341,14 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram");
RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data.");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform");
RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data.");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
func= RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope");
RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data.");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
func= RNA_def_function(srna, "template_layers", "uiTemplateLayers");
api_ui_item_rna_common(func);

@ -77,7 +77,7 @@ static void deformVertsEM(ModifierData *md, Object *ob,
static void deformMatricesEM(ModifierData *UNUSED(md), Object *ob,
struct EditMesh *UNUSED(editData),
DerivedMesh *UNUSED(derivedData),
float UNUSED((*vertexCos)[3]),
float (*vertexCos)[3],
float (*defMats)[3][3],
int numVerts)
{

@ -205,7 +205,7 @@ int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index)
/* BaseMathObject generic functions for all mathutils types */
char BaseMathObject_Owner_doc[] = "The item this is wrapping or None (readonly).";
PyObject *BaseMathObject_getOwner(BaseMathObject *UNUSED(self), void *UNUSED(type))
PyObject *BaseMathObject_getOwner(BaseMathObject *self, void *UNUSED(closure))
{
PyObject *ret= self->cb_user ? self->cb_user : Py_None;
Py_INCREF(ret);
@ -213,7 +213,7 @@ PyObject *BaseMathObject_getOwner(BaseMathObject *UNUSED(self), void *UNUSED(typ
}
char BaseMathObject_Wrapped_doc[] = "True when this object wraps external data (readonly).\n\n:type: boolean";
PyObject *BaseMathObject_getWrapped(BaseMathObject *UNUSED(self), void *UNUSED(type))
PyObject *BaseMathObject_getWrapped(BaseMathObject *self, void *UNUSED(closure))
{
return PyBool_FromLong((self->wrapped == Py_WRAP) ? 1:0);
}

@ -31,7 +31,7 @@
//----------------------------------mathutils.Color() -------------------
//makes a new color for you to play with
static PyObject *Color_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds)
static PyObject *Color_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
float col[3]= {0.0f, 0.0f, 0.0f};

@ -107,7 +107,7 @@ wmKeyConfig *WM_keyconfig_new (struct wmWindowManager *wm, char *idname);
wmKeyConfig *WM_keyconfig_new_user(struct wmWindowManager *wm, char *idname);
void WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf);
void WM_keyconfig_free (struct wmKeyConfig *keyconf);
void WM_keyconfig_userdef(struct wmWindowManager *wm);
void WM_keyconfig_userdef(void);
void WM_keymap_init (struct bContext *C);
void WM_keymap_free (struct wmKeyMap *keymap);

@ -205,7 +205,7 @@ void WM_keymap_init(bContext *C)
/* create default key config */
wm_window_keymap(wm->defaultconf);
ED_spacetypes_keymap(wm->defaultconf);
WM_keyconfig_userdef(wm);
WM_keyconfig_userdef();
wm->initialized |= WM_INIT_KEYMAP;
}

@ -1894,7 +1894,7 @@ wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap
}
/* priorities not implemented yet, for time being just insert in begin of list */
wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int priority)
wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int UNUSED(priority))
{
wmEventHandler *handler;
@ -2167,7 +2167,7 @@ static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *wi
/* windows store own event queues, no bContext here */
/* time is in 1000s of seconds, from ghost */
void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int time, void *customdata)
void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int UNUSED(time), void *customdata)
{
wmWindow *owin;
wmEvent event, *evt= win->eventstate;

@ -283,7 +283,7 @@ void WM_read_file(bContext *C, char *name, ReportList *reports)
/* also exit screens and editors */
wm_window_match_init(C, &wmbase);
retval= BKE_read_file(C, name, NULL, reports);
retval= BKE_read_file(C, name, reports);
G.save_over = 1;
/* this flag is initialized by the operator but overwritten on read.
@ -369,9 +369,9 @@ int WM_read_homefile(bContext *C, wmOperator *op)
wm_window_match_init(C, &wmbase);
if (!from_memory && BLI_exists(tstr)) {
success = BKE_read_file(C, tstr, NULL, NULL);
success = BKE_read_file(C, tstr, NULL);
} else {
success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL, NULL);
success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL);
if (wmbase.first == NULL) wm_clear_default_size(C);
}
@ -735,7 +735,7 @@ void WM_autosave_init(wmWindowManager *wm)
wm->autosavetimer= WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, U.savetime*60.0);
}
void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt)
void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(wt))
{
wmWindow *win;
wmEventHandler *handler;

@ -121,7 +121,7 @@ void WM_gestures_remove(bContext *C)
/* tweak and line gestures */
#define TWEAK_THRESHOLD 10
int wm_gesture_evaluate(bContext *C, wmGesture *gesture)
int wm_gesture_evaluate(wmGesture *gesture)
{
if(gesture->type==WM_GESTURE_TWEAK) {
rcti *rect= gesture->customdata;
@ -159,7 +159,7 @@ int wm_gesture_evaluate(bContext *C, wmGesture *gesture)
/* ******************* gesture draw ******************* */
static void wm_gesture_draw_rect(wmWindow *win, wmGesture *gt)
static void wm_gesture_draw_rect(wmGesture *gt)
{
rcti *rect= (rcti *)gt->customdata;
@ -183,7 +183,7 @@ static void wm_gesture_draw_rect(wmWindow *win, wmGesture *gt)
glDisable(GL_LINE_STIPPLE);
}
static void wm_gesture_draw_line(wmWindow *win, wmGesture *gt)
static void wm_gesture_draw_line(wmGesture *gt)
{
rcti *rect= (rcti *)gt->customdata;
@ -199,7 +199,7 @@ static void wm_gesture_draw_line(wmWindow *win, wmGesture *gt)
}
static void wm_gesture_draw_circle(wmWindow *win, wmGesture *gt)
static void wm_gesture_draw_circle(wmGesture *gt)
{
rcti *rect= (rcti *)gt->customdata;
@ -261,7 +261,7 @@ static void draw_filled_lasso(wmGesture *gt)
}
}
static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt)
static void wm_gesture_draw_lasso(wmGesture *gt)
{
short *lasso= (short *)gt->customdata;
int i;
@ -320,23 +320,23 @@ void wm_gesture_draw(wmWindow *win)
wmSubWindowSet(win, gt->swinid);
if(gt->type==WM_GESTURE_RECT)
wm_gesture_draw_rect(win, gt);
wm_gesture_draw_rect(gt);
else if(gt->type==WM_GESTURE_TWEAK)
wm_gesture_draw_line(win, gt);
wm_gesture_draw_line(gt);
else if(gt->type==WM_GESTURE_CIRCLE)
wm_gesture_draw_circle(win, gt);
wm_gesture_draw_circle(gt);
else if(gt->type==WM_GESTURE_CROSS_RECT) {
if(gt->mode==1)
wm_gesture_draw_rect(win, gt);
wm_gesture_draw_rect(gt);
else
wm_gesture_draw_cross(win, gt);
}
else if(gt->type==WM_GESTURE_LINES)
wm_gesture_draw_lasso(win, gt);
wm_gesture_draw_lasso(gt);
else if(gt->type==WM_GESTURE_LASSO)
wm_gesture_draw_lasso(win, gt);
wm_gesture_draw_lasso(gt);
else if(gt->type==WM_GESTURE_STRAIGHTLINE)
wm_gesture_draw_line(win, gt);
wm_gesture_draw_line(gt);
}
}
@ -351,5 +351,3 @@ void wm_gesture_tag_redraw(bContext *C)
wm_tag_redraw_overlay(win, ar);
}

@ -118,7 +118,7 @@ void WM_keyconfig_free(wmKeyConfig *keyconf)
MEM_freeN(keyconf);
}
void WM_keyconfig_userdef(wmWindowManager *wm)
void WM_keyconfig_userdef(void)
{
wmKeyMap *km;
wmKeyMapItem *kmi;
@ -419,7 +419,7 @@ char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len)
return str;
}
static wmKeyMapItem *wm_keymap_item_find_handlers(const bContext *C, ListBase *handlers, const char *opname, int opcontext, IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
static wmKeyMapItem *wm_keymap_item_find_handlers(const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext), IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
{
wmWindowManager *wm= CTX_wm_manager(C);
wmEventHandler *handler;

@ -619,7 +619,7 @@ void WM_operator_properties_free(PointerRNA *ptr)
/* ************ default op callbacks, exported *********** */
/* invoke callback, uses enum property named "type" */
int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
PropertyRNA *prop= op->type->prop;
uiPopupMenu *pup;
@ -724,7 +724,7 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op)
}
int WM_enum_search_invoke(bContext *C, wmOperator *op, wmEvent *event)
int WM_enum_search_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
uiPupBlock(C, wm_enum_search_menu, op);
return OPERATOR_CANCELLED;
@ -751,13 +751,13 @@ int WM_operator_confirm_message(bContext *C, wmOperator *op, char *message)
}
int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *event)
int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
return WM_operator_confirm_message(C, op, NULL);
}
/* op->invoke, opens fileselect if path property not set, otherwise executes */
int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event)
int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
if (RNA_property_is_set(op->ptr, "filepath")) {
return WM_operator_call(C, op);
@ -862,7 +862,7 @@ int WM_operator_winactive(bContext *C)
}
/* op->invoke */
static void redo_cb(bContext *C, void *arg_op, int event)
static void redo_cb(bContext *C, void *arg_op, int UNUSED(event))
{
wmOperator *lastop= arg_op;
@ -903,7 +903,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
op->layout= NULL;
}
else
uiDefAutoButsRNA(C, layout, &ptr, columns);
uiDefAutoButsRNA(layout, &ptr, columns);
uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block);
@ -922,7 +922,7 @@ static void dialog_exec_cb(bContext *C, void *arg1, void *arg2)
uiPupBlockClose(C, block);
}
void dialog_check_cb(bContext *C, void *op_ptr, void *dummy2)
void dialog_check_cb(bContext *C, void *op_ptr, void *UNUSED(arg))
{
wmOperator *op= op_ptr;
if(op->type->check) {
@ -966,7 +966,7 @@ static uiBlock *wm_block_create_dialog(bContext *C, ARegion *ar, void *userData)
op->layout= NULL;
}
else
uiDefAutoButsRNA(C, layout, &ptr, columns);
uiDefAutoButsRNA(layout, &ptr, columns);
uiBlockSetFunc(block, NULL, NULL, NULL);
@ -1014,7 +1014,7 @@ static uiBlock *wm_operator_create_ui(bContext *C, ARegion *ar, void *userData)
return block;
}
int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *event)
int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
int retval= OPERATOR_CANCELLED;
@ -1083,7 +1083,7 @@ static uiBlock *wm_block_create_menu(bContext *C, ARegion *ar, void *arg_op)
op->layout= NULL;
}
else
uiDefAutoButsRNA(C, layout, op->ptr, 2);
uiDefAutoButsRNA(layout, op->ptr, 2);
uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block);
@ -1100,7 +1100,7 @@ static int wm_debug_menu_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
RNA_int_set(op->ptr, "debugval", G.rt);
@ -1127,7 +1127,7 @@ static void WM_OT_debug_menu(wmOperatorType *ot)
/* ***************** Splash Screen ************************* */
static void wm_block_splash_close(bContext *C, void *arg_block, void *arg_unused)
static void wm_block_splash_close(bContext *C, void *arg_block, void *UNUSED(arg))
{
uiPupBlockClose(C, arg_block);
}
@ -1136,7 +1136,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse
/* XXX: hack to refresh splash screen with updated prest menu name,
* since popup blocks don't get regenerated like panels do */
void wm_block_splash_refreshmenu (bContext *C, void *arg_block, void *unused)
void wm_block_splash_refreshmenu (bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg))
{
/* ugh, causes crashes in other buttons, disabling for now until
* a better fix
@ -1145,7 +1145,7 @@ void wm_block_splash_refreshmenu (bContext *C, void *arg_block, void *unused)
*/
}
static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unused)
static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(arg))
{
uiBlock *block;
uiBut *but;
@ -1231,7 +1231,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse
return block;
}
static int wm_splash_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_splash_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
uiPupBlock(C, wm_block_create_splash, NULL);
@ -1250,7 +1250,7 @@ static void WM_OT_splash(wmOperatorType *ot)
/* ***************** Search menu ************************* */
static void operator_call_cb(struct bContext *C, void *arg1, void *arg2)
static void operator_call_cb(struct bContext *C, void *UNUSED(arg1), void *arg2)
{
wmOperatorType *ot= arg2;
@ -1258,7 +1258,7 @@ static void operator_call_cb(struct bContext *C, void *arg1, void *arg2)
WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL);
}
static void operator_search_cb(const struct bContext *C, void *arg, char *str, uiSearchItems *items)
static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), char *str, uiSearchItems *items)
{
wmOperatorType *ot = WM_operatortype_first();
@ -1285,7 +1285,7 @@ static void operator_search_cb(const struct bContext *C, void *arg, char *str, u
}
}
static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *arg_op)
static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *UNUSED(arg_op))
{
static char search[256]= "";
wmEvent event;
@ -1315,15 +1315,13 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *arg_op)
return block;
}
static int wm_search_menu_exec(bContext *C, wmOperator *op)
static int wm_search_menu_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
{
return OPERATOR_FINISHED;
}
static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
uiPupBlock(C, wm_block_search_menu, op);
return OPERATOR_CANCELLED;
@ -1389,7 +1387,7 @@ static void WM_OT_window_duplicate(wmOperatorType *ot)
ot->idname= "WM_OT_window_duplicate";
ot->description="Duplicate the current Blender window";
ot->exec= wm_window_duplicate_op;
ot->exec= wm_window_duplicate_exec;
ot->poll= wm_operator_winactive_normal;
}
@ -1440,7 +1438,7 @@ static void open_set_use_scripts(wmOperator *op)
RNA_boolean_set(op->ptr, "use_scripts", !(U.flag & USER_SCRIPT_AUTOEXEC_DISABLE));
}
static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
RNA_string_set(op->ptr, "filepath", G.sce);
open_set_load_ui(op);
@ -1496,7 +1494,7 @@ static void WM_OT_open_mainfile(wmOperatorType *ot)
/* **************** link/append *************** */
static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
if(!RNA_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
@ -1721,7 +1719,7 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
char filename[FILE_MAX];
@ -1769,7 +1767,7 @@ static void save_set_compress(wmOperator *op)
}
}
static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
char name[FILE_MAX];
@ -1820,7 +1818,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
}
/* function used for WM_OT_save_mainfile too */
static int blend_save_check(bContext *C, wmOperator *op)
static int blend_save_check(bContext *UNUSED(C), wmOperator *op)
{
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
@ -1850,7 +1848,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot)
/* *************** save file directly ******** */
static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
char name[FILE_MAX];
int check_existing=1;
@ -1985,7 +1983,7 @@ static void WM_OT_window_fullscreen_toggle(wmOperatorType *ot)
ot->idname= "WM_OT_window_fullscreen_toggle";
ot->description="Toggle the current window fullscreen";
ot->exec= wm_window_fullscreen_toggle_op;
ot->exec= wm_window_fullscreen_toggle_exec;
ot->poll= WM_operator_winactive;
}
@ -2301,7 +2299,7 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event)
rect->xmax= event->x - sx;
rect->ymax= event->y - sy;
if((val= wm_gesture_evaluate(C, gesture))) {
if((val= wm_gesture_evaluate(gesture))) {
wmEvent event;
event= *(window->eventstate);
@ -2394,7 +2392,7 @@ int WM_gesture_lines_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
static void gesture_lasso_apply(bContext *C, wmOperator *op, int event_type)
static void gesture_lasso_apply(bContext *C, wmOperator *op)
{
wmGesture *gesture= op->customdata;
PointerRNA itemptr;
@ -2463,7 +2461,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event)
case MIDDLEMOUSE:
case RIGHTMOUSE:
if(event->val==KM_RELEASE) { /* key release */
gesture_lasso_apply(C, op, event->type);
gesture_lasso_apply(C, op);
return OPERATOR_FINISHED;
}
break;
@ -2856,11 +2854,11 @@ void WM_radial_control_string(wmOperator *op, char str[], int maxlen)
float v = RNA_float_get(op->ptr, "new_value");
if(mode == WM_RADIALCONTROL_SIZE)
sprintf(str, "Size: %d", (int)v);
BLI_snprintf(str, maxlen, "Size: %d", (int)v);
else if(mode == WM_RADIALCONTROL_STRENGTH)
sprintf(str, "Strength: %d", (int)v);
BLI_snprintf(str, maxlen, "Strength: %d", (int)v);
else if(mode == WM_RADIALCONTROL_ANGLE)
sprintf(str, "Angle: %d", (int)(v * 180.0f/M_PI));
BLI_snprintf(str, maxlen, "Angle: %d", (int)(v * 180.0f/M_PI));
}
/** Important: this doesn't define an actual operator, it
@ -3027,7 +3025,7 @@ static void WM_OT_redraw_timer(wmOperatorType *ot)
/* ************************** memory statistics for testing ***************** */
static int memory_statistics_exec(bContext *C, wmOperator *op)
static int memory_statistics_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
{
MEM_printmemlist_stats();
return OPERATOR_FINISHED;
@ -3351,7 +3349,7 @@ void wm_window_keymap(wmKeyConfig *keyconf)
}
/* Generic itemf's for operators that take library args */
static EnumPropertyItem *rna_id_itemf(bContext *C, PointerRNA *ptr, int *free, ID *id, int local)
static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), int *free, ID *id, int local)
{
EnumPropertyItem *item= NULL, item_tmp;
int totitem= 0;

@ -40,6 +40,7 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BKE_utildefines.h"
#include "BKE_context.h"
#include "BKE_global.h"
@ -73,7 +74,7 @@ typedef struct wmSubWindow {
/* ******************* open, free, set, get data ******************** */
/* not subwindow itself */
static void wm_subwindow_free(wmSubWindow *swin)
static void wm_subwindow_free(wmSubWindow *UNUSED(swin))
{
/* future fancy stuff */
}

@ -290,7 +290,7 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win)
}
/* belongs to below */
static void wm_window_add_ghostwindow(bContext *C, wmWindowManager *wm, char *title, wmWindow *win)
static void wm_window_add_ghostwindow(bContext *C, char *title, wmWindow *win)
{
GHOST_WindowHandle ghostwin;
int scr_w, scr_h, posy;
@ -384,7 +384,7 @@ void wm_window_add_ghostwindows(bContext* C, wmWindowManager *wm)
win->windowstate= initialstate;
useprefsize= 0;
}
wm_window_add_ghostwindow(C, wm, "Blender", win);
wm_window_add_ghostwindow(C, "Blender", win);
}
/* happens after fileread */
if(win->eventstate==NULL)
@ -493,7 +493,7 @@ void WM_window_open_temp(bContext *C, rcti *position, int type)
/* ****************** Operators ****************** */
/* operator callback */
int wm_window_duplicate_op(bContext *C, wmOperator *op)
int wm_window_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
{
wm_window_copy(C, CTX_wm_window(C));
WM_check(C);
@ -505,7 +505,7 @@ int wm_window_duplicate_op(bContext *C, wmOperator *op)
/* fullscreen operator callback */
int wm_window_fullscreen_toggle_op(bContext *C, wmOperator *op)
int wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *UNUSED(op))
{
wmWindow *window= CTX_wm_window(C);
GHOST_TWindowState state = GHOST_GetWindowState(window->ghostwin);
@ -895,7 +895,7 @@ void wm_window_process_events(const bContext *C)
PIL_sleep_ms(5);
}
void wm_window_process_events_nosleep(const bContext *C)
void wm_window_process_events_nosleep(void)
{
if(GHOST_ProcessEvents(g_system, 0))
GHOST_DispatchEvents(g_system);
@ -943,7 +943,7 @@ void wm_ghost_exit(void)
/* **************** timer ********************** */
/* to (de)activate running timers temporary */
void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *win, wmTimer *timer, int dosleep)
void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer, int dosleep)
{
wmTimer *wt;
@ -971,7 +971,7 @@ wmTimer *WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type,
return wt;
}
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *win, wmTimer *timer)
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
{
wmTimer *wt;

@ -61,7 +61,7 @@ void wm_tweakevent_test(bContext *C, wmEvent *event, int action);
/* wm_gesture.c */
#define WM_LASSO_MIN_POINTS 1024
void wm_gesture_draw(struct wmWindow *win);
int wm_gesture_evaluate(bContext *C, wmGesture *gesture);
int wm_gesture_evaluate(wmGesture *gesture);
void wm_gesture_tag_redraw(bContext *C);
/* wm_jobs.c */

@ -45,7 +45,7 @@ void wm_window_close (bContext *C, wmWindowManager *wm, wmWindow *win);
void wm_window_title (wmWindowManager *wm, wmWindow *win);
void wm_window_add_ghostwindows (bContext *C, wmWindowManager *wm);
void wm_window_process_events (const bContext *C);
void wm_window_process_events_nosleep(const bContext *C);
void wm_window_process_events_nosleep(void);
void wm_window_make_drawable(bContext *C, wmWindow *win);
@ -65,8 +65,8 @@ wmWindow *wm_window_copy (bContext *C, wmWindow *winorig);
void wm_window_testbreak (void);
/* *************** window operators ************** */
int wm_window_duplicate_op (bContext *C, struct wmOperator *op);
int wm_window_fullscreen_toggle_op(bContext *C, struct wmOperator *op);
int wm_window_duplicate_exec(bContext *C, struct wmOperator *op);
int wm_window_fullscreen_toggle_exec(bContext *C, struct wmOperator *op);
#endif /* WM_WINDOW_H */

@ -873,7 +873,7 @@ static int load_file(int argc, char **argv, void *data)
BLI_path_cwd(filename);
if (G.background) {
int retval = BKE_read_file(C, filename, NULL, NULL);
int retval = BKE_read_file(C, filename, NULL);
/*we successfully loaded a blend file, get sure that
pointcache works */

@ -440,7 +440,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
ketsjiengine->Render();
}
wm_window_process_events_nosleep(C);
wm_window_process_events_nosleep();
// test for the ESC key
//XXX while (qtest())