forked from bartvdbraak/blender
Code cleanup: add UNUSED_FUNCTION macro to avoid warning messages about unused
functions.
This commit is contained in:
parent
27b3695c4f
commit
ae884d2e54
@ -1582,7 +1582,7 @@ void BKE_nla_tweakmode_exit (AnimData *adt)
|
||||
|
||||
/* Baking Tools ------------------------------------------- */
|
||||
|
||||
static void BKE_nla_bake (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
|
||||
static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
|
||||
{
|
||||
|
||||
/* verify that data is valid
|
||||
|
@ -183,6 +183,12 @@
|
||||
# define UNUSED(x) UNUSED_ ## x
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define UNUSED_FUNCTION(x) __attribute__((__unused__)) UNUSED_ ## x
|
||||
#else
|
||||
# define UNUSED_FUNCTION(x) UNUSED_ ## x
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define WARN_UNUSED __attribute__((warn_unused_result))
|
||||
#else
|
||||
|
@ -1697,7 +1697,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
|
||||
|
||||
|
||||
/* ctrl+c in mesh editmode */
|
||||
static void mesh_copy_menu(EditMesh *em, wmOperator *op)
|
||||
static void UNUSED_FUNCTION(mesh_copy_menu)(EditMesh *em, wmOperator *op)
|
||||
{
|
||||
EditSelection *ese;
|
||||
int ret;
|
||||
|
@ -3895,7 +3895,7 @@ void MESH_OT_edge_rotate(wmOperatorType *ot)
|
||||
|
||||
/* XXX old bevel not ported yet */
|
||||
|
||||
static void bevel_menu(EditMesh *em)
|
||||
static void UNUSED_FUNCTION(bevel_menu)(EditMesh *em)
|
||||
{
|
||||
BME_Mesh *bm;
|
||||
BME_TransData_Head *td;
|
||||
|
@ -721,7 +721,7 @@ static void spot_interactive(Object *ob, int mode)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void special_editmenu(Scene *scene, View3D *v3d)
|
||||
static void UNUSED_FUNCTION(special_editmenu)(Scene *scene, View3D *v3d)
|
||||
{
|
||||
// XXX static short numcuts= 2;
|
||||
Object *ob= OBACT;
|
||||
@ -1343,7 +1343,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
|
||||
DAG_ids_flush_update(bmain, 0);
|
||||
}
|
||||
|
||||
static void copy_attr_menu(Main *bmain, Scene *scene, View3D *v3d)
|
||||
static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v3d)
|
||||
{
|
||||
Object *ob;
|
||||
short event;
|
||||
@ -1616,7 +1616,7 @@ void OBJECT_OT_shade_smooth(wmOperatorType *ot)
|
||||
|
||||
/* ********************** */
|
||||
|
||||
static void image_aspect(Scene *scene, View3D *v3d)
|
||||
static void UNUSED_FUNCTION(image_aspect)(Scene *scene, View3D *v3d)
|
||||
{
|
||||
/* all selected objects with an image map: scale in image aspect */
|
||||
Base *base;
|
||||
@ -1691,7 +1691,7 @@ static int vergbaseco(const void *a1, const void *a2)
|
||||
}
|
||||
|
||||
|
||||
static void auto_timeoffs(Scene *scene, View3D *v3d)
|
||||
static void UNUSED_FUNCTION(auto_timeoffs)(Scene *scene, View3D *v3d)
|
||||
{
|
||||
Base *base, **basesort, **bs;
|
||||
float start, delta;
|
||||
@ -1732,7 +1732,7 @@ static void auto_timeoffs(Scene *scene, View3D *v3d)
|
||||
|
||||
}
|
||||
|
||||
static void ofs_timeoffs(Scene *scene, View3D *v3d)
|
||||
static void UNUSED_FUNCTION(ofs_timeoffs)(Scene *scene, View3D *v3d)
|
||||
{
|
||||
float offset=0.0f;
|
||||
|
||||
@ -1751,7 +1751,7 @@ static void ofs_timeoffs(Scene *scene, View3D *v3d)
|
||||
}
|
||||
|
||||
|
||||
static void rand_timeoffs(Scene *scene, View3D *v3d)
|
||||
static void UNUSED_FUNCTION(rand_timeoffs)(Scene *scene, View3D *v3d)
|
||||
{
|
||||
Base *base;
|
||||
float rand_ofs=0.0f;
|
||||
|
@ -602,28 +602,6 @@ short filelist_changed(struct FileList* filelist)
|
||||
return filelist->changed;
|
||||
}
|
||||
|
||||
static struct ImBuf * filelist_loadimage(struct FileList* filelist, int index)
|
||||
{
|
||||
ImBuf *imb = NULL;
|
||||
int fidx = 0;
|
||||
|
||||
if ( (index < 0) || (index >= filelist->numfiltered) ) {
|
||||
return NULL;
|
||||
}
|
||||
fidx = filelist->fidx[index];
|
||||
imb = filelist->filelist[fidx].image;
|
||||
if (!imb)
|
||||
{
|
||||
if ( (filelist->filelist[fidx].flags & IMAGEFILE) || (filelist->filelist[fidx].flags & MOVIEFILE) ) {
|
||||
imb = IMB_thumb_read(filelist->filelist[fidx].path, THB_NORMAL);
|
||||
}
|
||||
if (imb) {
|
||||
filelist->filelist[fidx].image = imb;
|
||||
}
|
||||
}
|
||||
return imb;
|
||||
}
|
||||
|
||||
struct ImBuf * filelist_getimage(struct FileList* filelist, int index)
|
||||
{
|
||||
ImBuf* ibuf = NULL;
|
||||
|
@ -951,7 +951,7 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op))
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
static void NLA_OT_bake (wmOperatorType *ot)
|
||||
void NLA_OT_bake (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Bake Strips";
|
||||
|
@ -1641,7 +1641,7 @@ void NODE_OT_link_viewer(wmOperatorType *ot)
|
||||
|
||||
|
||||
/* return 0, nothing done */
|
||||
static int node_mouse_groupheader(SpaceNode *snode)
|
||||
static int UNUSED_FUNCTION(node_mouse_groupheader)(SpaceNode *snode)
|
||||
{
|
||||
bNode *gnode;
|
||||
float mx=0, my=0;
|
||||
|
@ -702,7 +702,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
|
||||
|
||||
static Sequence *special_seq_update= 0;
|
||||
|
||||
static void set_special_seq_update(int val)
|
||||
static void UNUSED_FUNCTION(set_special_seq_update)(int val)
|
||||
{
|
||||
// int x;
|
||||
|
||||
|
@ -75,10 +75,6 @@
|
||||
/* own include */
|
||||
#include "sequencer_intern.h"
|
||||
|
||||
static void error(const char *UNUSED(dummy)) {}
|
||||
static void waitcursor(int UNUSED(val)) {}
|
||||
static void activate_fileselect(int UNUSED(d1), const char *UNUSED(d2), const char *UNUSED(d3), void *UNUSED(d4)) {}
|
||||
static int pupmenu(const char *UNUSED(dummy)) {return 0;}
|
||||
static int okee(const char *UNUSED(dummy)) {return 0;}
|
||||
|
||||
|
||||
@ -139,7 +135,7 @@ void seq_rectf(Sequence *seq, rctf *rectf)
|
||||
rectf->ymax= seq->machine+SEQ_STRIP_OFSTOP;
|
||||
}
|
||||
|
||||
static void change_plugin_seq(Scene *scene, char *str) /* called from fileselect */
|
||||
static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* called from fileselect */
|
||||
{
|
||||
Editing *ed= seq_give_editing(scene, FALSE);
|
||||
struct SeqEffectHandle sh;
|
||||
@ -762,7 +758,7 @@ static int insert_gap(Scene *scene, int gap, int cfra)
|
||||
return done;
|
||||
}
|
||||
|
||||
static void touch_seq_files(Scene *scene)
|
||||
static void UNUSED_FUNCTION(touch_seq_files)(Scene *scene)
|
||||
{
|
||||
Sequence *seq;
|
||||
Editing *ed= seq_give_editing(scene, FALSE);
|
||||
@ -774,7 +770,7 @@ static void touch_seq_files(Scene *scene)
|
||||
|
||||
if(okee("Touch and print selected movies")==0) return;
|
||||
|
||||
waitcursor(1);
|
||||
WM_cursor_wait(1);
|
||||
|
||||
SEQP_BEGIN(ed, seq) {
|
||||
if(seq->flag & SELECT) {
|
||||
@ -789,7 +785,7 @@ static void touch_seq_files(Scene *scene)
|
||||
}
|
||||
SEQ_END
|
||||
|
||||
waitcursor(0);
|
||||
WM_cursor_wait(0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -817,7 +813,7 @@ static void set_filter_seq(Scene *scene)
|
||||
}
|
||||
*/
|
||||
|
||||
static void seq_remap_paths(Scene *scene)
|
||||
static void UNUSED_FUNCTION(seq_remap_paths)(Scene *scene)
|
||||
{
|
||||
Sequence *seq, *last_seq = seq_active_get(scene);
|
||||
Editing *ed= seq_give_editing(scene, FALSE);
|
||||
@ -858,7 +854,7 @@ static void seq_remap_paths(Scene *scene)
|
||||
}
|
||||
|
||||
|
||||
static void no_gaps(Scene *scene)
|
||||
static void UNUSED_FUNCTION(no_gaps)(Scene *scene)
|
||||
{
|
||||
Editing *ed= seq_give_editing(scene, FALSE);
|
||||
int cfra, first= 0, done;
|
||||
|
@ -159,7 +159,7 @@ void select_surround_from_last(Scene *scene)
|
||||
#endif
|
||||
|
||||
|
||||
static void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */
|
||||
static void UNUSED_FUNCTION(select_single_seq)(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */
|
||||
{
|
||||
Editing *ed= seq_give_editing(scene, FALSE);
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "BKE_text.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "WM_types.h"
|
||||
|
||||
@ -192,7 +193,7 @@ static void confirm_suggestion(Text *text, int skipleft)
|
||||
// XXX
|
||||
static int doc_scroll= 0;
|
||||
|
||||
static short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val)
|
||||
static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned short evnt, short val)
|
||||
{
|
||||
ARegion *ar= NULL; // XXX
|
||||
int qual= 0; // XXX
|
||||
@ -375,7 +376,7 @@ static short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short
|
||||
; // XXX redraw_alltext();
|
||||
#endif
|
||||
|
||||
static short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val)
|
||||
static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned short evnt, short val)
|
||||
{
|
||||
Text *text;
|
||||
TextMarker *marker, *mrk, *nxt;
|
||||
|
@ -1679,7 +1679,7 @@ static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int
|
||||
|
||||
/* not used, test function for ambient occlusion (yaf: pathlight) */
|
||||
/* main problem; has to be called within shading loop, giving unwanted recursion */
|
||||
static int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr)
|
||||
static int UNUSED_FUNCTION(ray_trace_shadow_rad)(ShadeInput *ship, ShadeResult *shr)
|
||||
{
|
||||
static int counter=0, only_one= 0;
|
||||
extern float hashvectf[];
|
||||
|
@ -450,7 +450,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
|
||||
/* called on startup, (context entirely filled with NULLs) */
|
||||
/* or called for 'New File' */
|
||||
/* op can be NULL */
|
||||
int WM_read_homefile(bContext *C, ReportList *reports, short from_memory)
|
||||
int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory)
|
||||
{
|
||||
ListBase wmbase;
|
||||
char tstr[FILE_MAXDIR+FILE_MAXFILE];
|
||||
|
@ -2010,8 +2010,6 @@ static void WM_OT_save_mainfile(wmOperatorType *ot)
|
||||
|
||||
static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
|
||||
{
|
||||
int selected = 0;
|
||||
|
||||
if(!RNA_property_is_set(op->ptr, "filepath")) {
|
||||
char filepath[FILE_MAX];
|
||||
BLI_strncpy(filepath, G.main->name, sizeof(filepath));
|
||||
|
Loading…
Reference in New Issue
Block a user