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
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-01-14 19:37:52 +0300
committerTon Roosendaal <ton@blender.org>2009-01-14 19:37:52 +0300
commit30e851b8a536194a78a674dd33fad9a939122ea1 (patch)
tree2956594b04f24d58cc63f9c1bdecf24cfb9daf1c /source/blender/editors
parent9aec7aaf6c560ddc0c2dd1c553c809f9b1e706d5 (diff)
2.5
A small round of warning cleanups; unused variables, missing headers and some const types.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_markers.c2
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c6
-rw-r--r--source/blender/editors/include/ED_markers.h2
-rw-r--r--source/blender/editors/space_api/spacetypes.c7
-rw-r--r--source/blender/editors/space_ipo/ipo_draw.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c3
-rw-r--r--source/blender/editors/space_node/node_header.c2
-rw-r--r--source/blender/editors/space_node/node_select.c2
-rw-r--r--source/blender/editors/transform/transform_ops.c6
9 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index a08f3911c36..d0f691693ec 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -567,7 +567,7 @@ static void select_timeline_marker_frame(ListBase *markers, int frame, unsigned
}
}
-static int find_nearest_marker_time(ListBase *markers, float dx)
+int find_nearest_marker_time(ListBase *markers, float dx)
{
TimeMarker *marker, *nearest= NULL;
float dist, min_dist= 1000000;
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index 79057b95fd1..e23f8500571 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -58,9 +58,10 @@
#include "PIL_time.h"
#include "ED_anim_api.h"
+#include "ED_gpencil.h"
#include "ED_keyframes_edit.h"
#include "ED_keyframes_draw.h"
-#include "ED_gpencil.h"
+#include "ED_markers.h"
#include "ED_util.h"
#include "ED_types.h"
@@ -71,7 +72,6 @@ static void actdata_filter() {}
static void BIF_undo_push() {}
static void error() {}
static void *get_action_context() {return NULL;}
-static int find_nearest_marker_time() {return 1;}
/* XXX */
@@ -600,7 +600,7 @@ static short snap_gpf_cframe (bGPDframe *gpf, Scene *scene)
static short snap_gpf_nearmarker (bGPDframe *gpf, Scene *scene)
{
if (gpf->flag & GP_FRAME_SELECT)
- gpf->framenum= (int)find_nearest_marker_time((float)gpf->framenum);
+ gpf->framenum= (int)find_nearest_marker_time(&scene->markers, (float)gpf->framenum);
return 0;
}
diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h
index 001c61c1589..0e9a82083a6 100644
--- a/source/blender/editors/include/ED_markers.h
+++ b/source/blender/editors/include/ED_markers.h
@@ -39,11 +39,13 @@ struct wmWindowManager;
struct bContext;
void draw_markers_time(const struct bContext *C, int flag);
+int find_nearest_marker_time(ListBase *markers, float dx);
/* called in screen_ops.c:ED_operatortypes_screen() */
void ED_marker_operatortypes(void);
/* called in screen_ops.c:ED_keymap_screen() */
void ED_marker_keymap(struct wmWindowManager *wm);
+
#endif /* ED_MARKERS_H */
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 814d068dc68..e54dc3817da 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -39,11 +39,12 @@
#include "BIF_gl.h"
-#include "ED_screen.h"
-#include "ED_object.h"
+#include "ED_anim_api.h"
#include "ED_mesh.h"
+#include "ED_object.h"
#include "ED_space_api.h"
-#include "ED_anim_api.h"
+#include "ED_screen.h"
+#include "ED_sculpt.h"
ARegionType *ED_regiontype_from_id(SpaceType *st, int regionid)
diff --git a/source/blender/editors/space_ipo/ipo_draw.c b/source/blender/editors/space_ipo/ipo_draw.c
index b24c4ca59a0..b492dbef94b 100644
--- a/source/blender/editors/space_ipo/ipo_draw.c
+++ b/source/blender/editors/space_ipo/ipo_draw.c
@@ -662,7 +662,7 @@ void drawipospace(ScrArea *sa, ARegion *ar)
{
SpaceIpo *sipo= sa->spacedata.first;
//View2D *v2d= &ar->v2d;
- EditIpo *ei;
+ // EditIpo *ei;
if(sipo->editipo) {
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 6e026dc08d9..03346835117 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -2751,9 +2751,9 @@ void winqreadnodespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
static int node_delete_selection_exec(bContext *C, wmOperator *op)
{
- wmWindow *window= CTX_wm_window(C);
SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
ARegion *ar= CTX_wm_region(C);
+
node_delete(snode);
ED_region_tag_redraw(ar);
WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); /* Do we need to pass the scene? */
@@ -2765,7 +2765,6 @@ static int node_delete_selection_exec(bContext *C, wmOperator *op)
void NODE_OT_delete_selection(wmOperatorType *ot)
{
- PropertyRNA *prop;
/* identifiers */
ot->name= "Delete";
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index 7d333d9b1c0..6883affe0b2 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -126,7 +126,7 @@ static uiBlock *node_selectmenu(bContext *C, uiMenuBlockHandle *handle, void *ar
void do_node_addmenu(bContext *C, void *arg, int event)
{
// XXX enable
- ScrArea *curarea= CTX_wm_area(C);
+ // ScrArea *curarea= CTX_wm_area(C);
SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
bNode *node;
//float locx, locy;
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 66db399bdf8..cad19982b20 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -106,7 +106,7 @@ static void node_mouse_select(SpaceNode *snode, ARegion *ar, short *mval, short
static int node_select_exec(bContext *C, wmOperator *op)
{
- wmWindow *window= CTX_wm_window(C);
+ // XXX wmWindow *window= CTX_wm_window(C);
SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
ARegion *ar= CTX_wm_region(C);
int select_type;
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 6e48de9bc00..5028440e1db 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -135,8 +135,8 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event)
void TFM_OT_transform(struct wmOperatorType *ot)
{
PropertyRNA *prop;
- static float value[4] = {0, 0, 0};
- static float mtx[3][3] = {{1, 0, 0},{0, 1, 0},{0, 0, 1}};
+ static const float value[4] = {0, 0, 0};
+ static const float mtx[3][3] = {{1, 0, 0},{0, 1, 0},{0, 0, 1}};
/* identifiers */
ot->name = "Transform";
@@ -162,7 +162,7 @@ void TFM_OT_transform(struct wmOperatorType *ot)
prop = RNA_def_property(ot->srna, "constraint_matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_array(prop, 9);
- RNA_def_property_float_array_default(prop, mtx);
+ RNA_def_property_float_array_default(prop, mtx[0]);
}
void transform_operatortypes(void)