From 4f29aeeff2cfe1dbe0a12910932c48ee453a6de1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Aug 2013 03:44:05 +0000 Subject: code cleanup: some structs were declaring data when only typedef's were intended, make local vars and functions static. --- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/editors/interface/interface_ops.c | 4 ++-- source/blender/editors/sculpt_paint/paint_utils.c | 2 +- source/blender/editors/space_file/space_file.c | 4 +++- source/blender/editors/space_nla/nla_buttons.c | 6 +++--- source/blender/editors/transform/transform.c | 2 +- source/blender/python/bmesh/bmesh_py_ops.c | 4 ++-- source/blender/python/bmesh/bmesh_py_types_meshdata.c | 2 +- source/blender/python/intern/bpy_rna.c | 2 +- 9 files changed, 15 insertions(+), 13 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 80a09b4701c..b1c89846e90 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7278,7 +7278,7 @@ static void link_global(FileData *fd, BlendFileData *bfd) } } -void convert_tface_mt(FileData *fd, Main *main) +static void convert_tface_mt(FileData *fd, Main *main) { Main *gmain; diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 5910909142c..cfe6e313c58 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -704,12 +704,12 @@ static void UI_OT_reports_to_textblock(wmOperatorType *ot) /* EditSource Utility funcs and operator, * note, this includes utility functions and button matching checks */ -struct uiEditSourceStore { +typedef struct uiEditSourceStore { uiBut but_orig; GHash *hash; } uiEditSourceStore; -struct uiEditSourceButStore { +typedef struct uiEditSourceButStore { char py_dbg_fn[FILE_MAX]; int py_dbg_ln; } uiEditSourceButStore; diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 3ecde56b5d0..d376bd3180f 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -412,7 +412,7 @@ void BRUSH_OT_curve_preset(wmOperatorType *ot) /* face-select ops */ static int paint_select_linked_exec(bContext *C, wmOperator *UNUSED(op)) { - paintface_select_linked(C, CTX_data_active_object(C), NULL, 2); + paintface_select_linked(C, CTX_data_active_object(C), NULL, true); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 8b1df0f0d8f..6f3d0367574 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -500,12 +500,14 @@ static void file_channel_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, 1, NULL, -1); } -static void file_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *wmn) +static void file_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) { +#if 0 /* context changes */ switch (wmn->category) { } +#endif } /* add handlers, stuff you only do once or on area/region changes */ diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index d3bef346705..ce7d537a518 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -68,14 +68,14 @@ /* -------------- */ -static void do_nla_region_buttons(bContext *C, void *UNUSED(arg), int event) +static void do_nla_region_buttons(bContext *C, void *UNUSED(arg), int UNUSED(event)) { //Scene *scene = CTX_data_scene(C); - +#if 0 switch (event) { } - +#endif /* default for now */ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); WM_event_add_notifier(C, NC_SCENE | ND_TRANSFORM, NULL); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index f67fab3429a..ed466186d63 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -5706,7 +5706,7 @@ int handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event) return 0; } -void drawEdgeSlide(const struct bContext *C, TransInfo *t) +static void drawEdgeSlide(const struct bContext *C, TransInfo *t) { if (t->mode == TFM_EDGE_SLIDE) { EdgeSlideData *sld = (EdgeSlideData *)t->customData; diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c index 8826baf81b7..4fc0160bbd6 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.c +++ b/source/blender/python/bmesh/bmesh_py_ops.c @@ -50,7 +50,7 @@ /* bmesh operator 'bmesh.ops.*' callable types * ******************************************* */ -PyTypeObject bmesh_op_Type; +static PyTypeObject bmesh_op_Type; static PyObject *bpy_bmesh_op_CreatePyObject(const char *opname) { @@ -140,7 +140,7 @@ static PyGetSetDef bpy_bmesh_op_getseters[] = { /* Types * ===== */ -PyTypeObject bmesh_op_Type = { +static PyTypeObject bmesh_op_Type = { PyVarObject_HEAD_INIT(NULL, 0) "BMeshOpFunc", /* tp_name */ sizeof(BPy_BMeshOpFunc), /* tp_basicsize */ diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index b8572baa7f9..06b11f02b2a 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -310,7 +310,7 @@ static int mathutils_bmloopcol_set_index(BaseMathObject *bmo, int subtype, int i return mathutils_bmloopcol_set(bmo, subtype); } -Mathutils_Callback mathutils_bmloopcol_cb = { +static Mathutils_Callback mathutils_bmloopcol_cb = { mathutils_bmloopcol_check, mathutils_bmloopcol_get, mathutils_bmloopcol_set, diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 9f7c589630a..3cd030e9b08 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5948,7 +5948,7 @@ PyTypeObject pyrna_func_Type = { static void pyrna_prop_collection_iter_dealloc(BPy_PropertyCollectionIterRNA *self); static PyObject *pyrna_prop_collection_iter_next(BPy_PropertyCollectionIterRNA *self); -PyTypeObject pyrna_prop_collection_iter_Type = { +static PyTypeObject pyrna_prop_collection_iter_Type = { PyVarObject_HEAD_INIT(NULL, 0) "bpy_prop_collection_iter", /* tp_name */ sizeof(BPy_PropertyCollectionIterRNA), /* tp_basicsize */ -- cgit v1.2.3