Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-08-15 20:18:04 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-08-15 20:18:04 +0400
commitae884d2e54210a8a1038c23cb7bdeaac16fdf2fb (patch)
tree7eae9ebf6103a46fb9e9cb2ae07aa8a006f7d8ef /source
parent27b3695c4f183629443397b643a0bc13d62f6f35 (diff)
Code cleanup: add UNUSED_FUNCTION macro to avoid warning messages about unused
functions.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/nla.c2
-rw-r--r--source/blender/blenlib/BLI_utildefines.h6
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c2
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c2
-rw-r--r--source/blender/editors/object/object_edit.c12
-rw-r--r--source/blender/editors/space_file/filelist.c22
-rw-r--r--source/blender/editors/space_nla/nla_edit.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c16
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c2
-rw-r--r--source/blender/editors/space_text/text_python.c5
-rw-r--r--source/blender/render/intern/source/rayshade.c2
-rw-r--r--source/blender/windowmanager/intern/wm_files.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
15 files changed, 30 insertions, 51 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index c02b5dda9ce..bd238e72d0c 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -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
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 9af55601ff7..28ebb254f2a 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -184,6 +184,12 @@
#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
# define WARN_UNUSED
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 9497370a4fa..eb6854d2548 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -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;
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index bfae101d38e..9ff2923f733 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -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;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index c8d38218533..61734bc51a2 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -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;
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 6736230e84f..d8be312cf39 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -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;
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 77c91b28a63..af99087b0b8 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -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";
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 984e944321e..e8fc13e340e 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -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;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 98687bb90e0..dc84289a8de 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -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;
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index ee5eb12f858..5429f0ee98f 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -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;
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 8d5f372f55e..0ac23765167 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -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);
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index 6e6f131655b..51b4b838171 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -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;
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 34d3adcf15b..d62f411a7c5 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -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[];
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index d9eb36eeb62..6b3a574b6b6 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -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];
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 105b2e8189a..1beb5b3dda3 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -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));