diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-27 11:31:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-27 11:31:10 +0300 |
commit | 2e5eb4152262adfc382860073dc5e73ced187e35 (patch) | |
tree | 3589c86b41a503b729c5a82462ad599a14fed4f3 /source/blender/editors | |
parent | f73c993b16c4083f0c72b87ba3f70fa12a5077df (diff) |
pedantic warning cleanup, also remove texspace_edit() since its been added using a different method.
Diffstat (limited to 'source/blender/editors')
22 files changed, 40 insertions, 80 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 9b307b92bec..7f3e58eb644 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -465,7 +465,7 @@ void ANIM_unit_mapping_apply_fcurve (Scene *scene, ID *id, FCurve *fcu, short fl // TODO: only sel? if (fcu->fpt) { FPoint *fpt; - int i; + unsigned int i; for (i=0, fpt=fcu->fpt; i < fcu->totvert; i++, fpt++) { /* apply unit mapping */ diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index eaf7590f7dc..dae6a8fdc68 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -281,7 +281,7 @@ void debug_markers_print_list(ListBase *markers) printf("List of markers follows: -----\n"); for (marker = markers->first; marker; marker = marker->next) { - printf("\t'%s' on %d at %p with %d\n", marker->name, marker->frame, marker, marker->flag); + printf("\t'%s' on %d at %p with %d\n", marker->name, marker->frame, (void *)marker, marker->flag); } printf("End of list ------------------\n"); diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index fb09b8d5c85..79e051c4927 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -902,8 +902,8 @@ void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, DLRBT_Tree { DLRBT_Tree *beztTree = NULL; BezTriple *bezt; - int v; - + unsigned int v; + if (fcu && fcu->totvert && fcu->bezt) { /* apply NLA-mapping (if applicable) */ if (adt) diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 23c2a5a013b..b9795f08951 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -90,7 +90,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi { BezTriple *bezt; short ok = 0; - int i; + unsigned int i; /* sanity check */ if (ELEM(NULL, fcu, fcu->bezt)) diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 50ceee3597d..18431db6849 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -295,7 +295,7 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag) int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag) { BezTriple beztr= {{{0}}}; - int oldTot = fcu->totvert; + unsigned int oldTot = fcu->totvert; int a; /* set all three points, for nicer start position diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h index fe0ac53cfaf..8f2b32844b5 100644 --- a/source/blender/editors/armature/BIF_retarget.h +++ b/source/blender/editors/armature/BIF_retarget.h @@ -160,5 +160,9 @@ void RIG_freeRigGraph(BGraph *rg); /* UNUSED */ void BIF_retargetArmature(bContext *C); void BIF_adjustRetarget(bContext *C); +/* UNUSED / print funcs */ +void RIG_printArc(struct RigGraph *rg, struct RigArc *arc); +void RIG_printGraph(struct RigGraph *rg); +void RIG_printArcBones(struct RigArc *arc); #endif /* BIF_RETARGET_H */ diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 86df851424c..291a91b3ae0 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -1429,7 +1429,7 @@ static void RIG_printNode(RigNode *node, const char name[]) } } -static void RIG_printArcBones(RigArc *arc) +void RIG_printArcBones(RigArc *arc) { RigEdge *edge; @@ -1480,7 +1480,7 @@ static void RIG_printLinkedCtrl(RigGraph *rg, EditBone *bone, int tabs) } } -static void RIG_printArc(RigGraph *rg, RigArc *arc) +void RIG_printArc(RigGraph *rg, RigArc *arc) { RigEdge *edge; @@ -1502,7 +1502,7 @@ static void RIG_printArc(RigGraph *rg, RigArc *arc) RIG_printNode((RigNode*)arc->tail, "tail"); } -static void RIG_printGraph(RigGraph *rg) +void RIG_printGraph(RigGraph *rg) { RigArc *arc; diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 13a8cef3d07..35b0be9c825 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -531,7 +531,7 @@ static int poselib_remove_exec (bContext *C, wmOperator *op) /* remove relevant keyframes */ for (fcu= act->curves.first; fcu; fcu= fcu->next) { BezTriple *bezt; - int i; + unsigned int i; if (fcu->bezt) { for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) { diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index acc806555ce..cbb71b2fc9e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1482,7 +1482,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste { char buf[UI_MAX_DRAW_STR]={0}; char *str, *p, *pbuf; - int len, x, y, i, changed= 0; + int len, x, i, changed= 0; str= data->str; len= strlen(str); @@ -1493,6 +1493,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste p = pbuf= WM_clipboard_text_get(0); if(p && p[0]) { + unsigned int y; i= 0; while (*p && *p!='\r' && *p!='\n' && i<UI_MAX_DRAW_STR-1) { buf[i++]=*p; diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 1ed9598e0b4..a05218e0255 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -46,7 +46,7 @@ int edgetag_shortest_path(Scene *scene, EditMesh *em, EditEdge *source, EditEdge extern void free_editvert(EditMesh *em, EditVert *eve); extern void free_editedge(EditMesh *em, EditEdge *eed); -extern void free_editface(EditMesh *em, EditFace *efa);; +extern void free_editface(EditMesh *em, EditFace *efa); extern void free_vertlist(EditMesh *em, ListBase *edve); extern void free_edgelist(EditMesh *em, ListBase *lb); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 2f90d722240..62529f6adca 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -561,8 +561,8 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int } con = constraints_findByName(list, constraint_name); - printf("constraint found = %p, %s\n", con, (con)?con->name:"<Not found>"); - + printf("constraint found = %p, %s\n", (void *)con, (con)?con->name:"<Not found>"); + if (con && (type != 0) && (con->type != type)) con = NULL; diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 48d12982691..355b5101285 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -648,53 +648,6 @@ void OBJECT_OT_rotation_apply(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -/************************ Texture Space Transform ****************************/ - -static void texspace_edit(Scene *scene, View3D *v3d) -{ - Base *base; - int nr=0; - - /* first test if from visible and selected objects - * texspacedraw is set: - */ - - if(scene->obedit) return; // XXX get from context - - for(base= FIRSTBASE; base; base= base->next) { - if(TESTBASELIB(v3d, base)) { - break; - } - } - - if(base==0) { - return; - } - - nr= 0; // XXX pupmenu("Texture Space %t|Grab/Move%x1|Size%x2"); - if(nr<1) return; - - for(base= FIRSTBASE; base; base= base->next) { - if(TESTBASELIB(v3d, base)) { - base->object->dtx |= OB_TEXSPACE; - } - } - - - if(nr==1) { -// XXX initTransform(TFM_TRANSLATION, CTX_TEXTURE); -// XXX Transform(); - } - else if(nr==2) { -// XXX initTransform(TFM_RESIZE, CTX_TEXTURE); -// XXX Transform(); - } - else if(nr==3) { -// XXX initTransform(TFM_ROTATION, CTX_TEXTURE); -// XXX Transform(); - } -} - /********************* Set Object Center ************************/ enum { diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 9ea8dde058f..61eb34349f9 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3805,7 +3805,7 @@ static void get_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo) LOOP_POINTS { LOOP_KEYS { - if((int)key->ftime == pm->frame) { + if((int)key->ftime == (int)pm->frame) { key->co = pm->cur[BPHYS_DATA_LOCATION]; key->vel = pm->cur[BPHYS_DATA_VELOCITY]; key->rot = pm->cur[BPHYS_DATA_ROTATION]; @@ -4029,7 +4029,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, return; if(!edit) { - totpoint = psys ? psys->totpart : ((PTCacheMem*)cache->mem_cache.first)->totpoint; + totpoint = psys ? psys->totpart : (int)((PTCacheMem*)cache->mem_cache.first)->totpoint; edit= MEM_callocN(sizeof(PTCacheEdit), "PE_create_particle_edit"); edit->points=MEM_callocN(totpoint*sizeof(PTCacheEditPoint),"PTCacheEditPoints"); diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 93b0ca49915..b4a0f1edaad 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -1070,10 +1070,6 @@ static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object return 0; } -static void fluidsimFreeBake(Object *UNUSED(ob)) -{ -} - #endif /* DISABLE_ELBEEM */ /***************************** Operators ******************************/ diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 44dbe447d3e..1fd1a26f512 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -942,7 +942,7 @@ static int check_seam(const ProjPaintState *ps, const int orig_face, const int o { LinkNode *node; int face_index; - int i1, i2; + unsigned int i1, i2; int i1_fidx = -1, i2_fidx = -1; /* index in face */ MFace *mf; MTFace *tf; diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 000db4c28f2..e38d77247ae 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -144,7 +144,7 @@ static void imapaint_tri_weights(Object *ob, float *v1, float *v2, float *v3, fl void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, int *xy, float *uv) { DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); - int *index = dm->getFaceDataArray(dm, CD_ORIGINDEX); + const int *index = dm->getFaceDataArray(dm, CD_ORIGINDEX); MTFace *tface = dm->getFaceDataArray(dm, CD_MTFACE), *tf; int numfaces = dm->getNumFaces(dm), a, findex; float p[2], w[3], absw, minabsw; @@ -156,7 +156,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, int *xy, /* test all faces in the derivedmesh with the original index of the picked face */ for(a = 0; a < numfaces; a++) { - findex= (index)? index[a]: a; + findex= index ? index[a]: a; if(findex == faceindex) { dm->getFace(dm, a, &mf); diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index bd19ff5e1b1..ce8970d0434 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -225,6 +225,8 @@ void ED_region_draw_cb_draw(const bContext *C, ARegion *ar, int type) /* ********************* space template *********************** */ +/* forward declare */ +void ED_spacetype_xxx(void); /* allocate and init some vars */ static SpaceLink *xxx_new(const bContext *UNUSED(C)) @@ -266,7 +268,7 @@ static void xxx_keymap(wmKeyConfig *UNUSED(keyconf)) } /* only called once, from screen/spacetypes.c */ -static void ED_spacetype_xxx(void) +void ED_spacetype_xxx(void) { static SpaceType st; diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index ec51be4d419..0e894510638 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -206,11 +206,11 @@ void NLA_OT_select_all_toggle (wmOperatorType *ot) */ /* defines for borderselect mode */ -static enum { +enum { NLA_BORDERSEL_ALLSTRIPS = 0, NLA_BORDERSEL_FRAMERANGE, NLA_BORDERSEL_CHANNELS, -} eNLAEDIT_BorderSelect_Mode; +} /* eNLAEDIT_BorderSelect_Mode */; static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, short selectmode) diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index edfe63e9dd4..a3f1648939b 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -56,7 +56,9 @@ #if defined WIN32 && !defined _LIBC # include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ #else -# define _GNU_SOURCE +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# endif # include <fnmatch.h> #endif diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 87ad27403da..6d611973f46 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -466,7 +466,8 @@ static struct ImBuf *make_histogram_view_from_ibuf_byte( struct ImBuf * ibuf) { struct ImBuf * rval = IMB_allocImBuf(515, 128, 32, IB_rect); - int n,c,x,y; + int c,x,y; + unsigned int n; unsigned char* src = (unsigned char*) ibuf->rect; unsigned int bins[3][256]; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index e916170a5fa..d110dbfb1ad 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -835,7 +835,8 @@ static void select_linked(Scene *scene, Image *ima, EditMesh *em, float limit[2] MTFace *tf; UvVertMap *vmap; UvMapVert *vlist, *iterv, *startv; - int a, i, nverts, stacksize= 0, *stack; + int i, nverts, stacksize= 0, *stack; + unsigned int a; char *flag; EM_init_index_arrays(em, 0, 0, 1); /* we can use this too */ @@ -2022,7 +2023,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje UvMapVert *start_vlist=NULL, *vlist_iter; struct UvVertMap *vmap; float limit[2]; - int efa_index; + unsigned int efa_index; //EditVert *eve; /* removed vert counting for now */ //int a; diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 981332c8fbf..1811819dda2 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -260,7 +260,7 @@ static int phash_size(PHash *ph) static void phash_insert(PHash *ph, PHashLink *link) { int size = ph->cursize; - int hash = PHASH_hash(ph, link->key); + uintptr_t hash = PHASH_hash(ph, link->key); PHashLink *lookup = ph->buckets[hash]; if (lookup == NULL) { @@ -296,7 +296,7 @@ static void phash_insert(PHash *ph, PHashLink *link) static PHashLink *phash_lookup(PHash *ph, PHashKey key) { PHashLink *link; - int hash = PHASH_hash(ph, key); + uintptr_t hash = PHASH_hash(ph, key); for (link = ph->buckets[hash]; link; link = link->next) if (link->key == key) @@ -309,7 +309,7 @@ static PHashLink *phash_lookup(PHash *ph, PHashKey key) static PHashLink *phash_next(PHash *ph, PHashKey key, PHashLink *link) { - int hash = PHASH_hash(ph, key); + uintptr_t hash = PHASH_hash(ph, key); for (link = link->next; link; link = link->next) if (link->key == key) |