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 | |
parent | f73c993b16c4083f0c72b87ba3f70fa12a5077df (diff) |
pedantic warning cleanup, also remove texspace_edit() since its been added using a different method.
50 files changed, 101 insertions, 137 deletions
diff --git a/source/blender/blenkernel/BKE_customdata_file.h b/source/blender/blenkernel/BKE_customdata_file.h index f97565f23a1..030d46fc1a6 100644 --- a/source/blender/blenkernel/BKE_customdata_file.h +++ b/source/blender/blenkernel/BKE_customdata_file.h @@ -44,12 +44,12 @@ void cdf_free(CDataFile *cdf); int cdf_read_open(CDataFile *cdf, char *filename); int cdf_read_layer(CDataFile *cdf, CDataFileLayer *blay); -int cdf_read_data(CDataFile *cdf, int size, void *data); +int cdf_read_data(CDataFile *cdf, unsigned int size, void *data); void cdf_read_close(CDataFile *cdf); int cdf_write_open(CDataFile *cdf, char *filename); int cdf_write_layer(CDataFile *cdf, CDataFileLayer *blay); -int cdf_write_data(CDataFile *cdf, int size, void *data); +int cdf_write_data(CDataFile *cdf, unsigned int size, void *data); void cdf_write_close(CDataFile *cdf); void cdf_remove(char *filename); diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 0f5780ed5b0..4a7e14f7d7d 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -156,7 +156,7 @@ int mesh_center_bounds(struct Mesh *me, float cent[3]); void mesh_translate(struct Mesh *me, float offset[3], int do_keys); /* mesh_validate.c */ -int BKE_mesh_validate_arrays(struct Mesh *me, struct MVert *mverts, int totvert, struct MEdge *medges, int totedge, struct MFace *mfaces, int totface, const short do_verbose, const short do_fixes); +int BKE_mesh_validate_arrays(struct Mesh *me, struct MVert *mverts, unsigned int totvert, struct MEdge *medges, unsigned int totedge, struct MFace *mfaces, unsigned int totface, const short do_verbose, const short do_fixes); int BKE_mesh_validate(struct Mesh *me, int do_verbose); int BKE_mesh_validate_dm(struct DerivedMesh *dm); diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index af625ae9d9c..648e67cad8a 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -305,7 +305,7 @@ int modifier_sameTopology(ModifierData *md); int modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode); void modifier_setError(struct ModifierData *md, const char *format, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 2, 3))); +__attribute__ ((format (printf, 2, 3))) #endif ; diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h index 397c96422a5..253f3ea9ac1 100644 --- a/source/blender/blenkernel/BKE_report.h +++ b/source/blender/blenkernel/BKE_report.h @@ -51,7 +51,7 @@ void BKE_reports_clear(ReportList *reports); void BKE_report(ReportList *reports, ReportType type, const char *message); void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 3, 4))); +__attribute__ ((format (printf, 3, 4))) #endif ; diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index ac85f91bf46..aa057e22d20 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -78,7 +78,7 @@ int scene_camera_switch_update(struct Scene *scene); char *scene_find_marker_name(struct Scene *scene, int frame); char *scene_find_last_marker_name(struct Scene *scene, int frame); -int scene_marker_tfm_translate(struct Scene *scene, int delta, int flag); +int scene_marker_tfm_translate(struct Scene *scene, int delta, unsigned int flag); int scene_marker_tfm_extend(struct Scene *scene, int delta, int flag, int frame, char side); int scene_marker_tfm_scale(struct Scene *scene, float value, int flag); diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 14a0f71f824..d4c9c5dd221 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -1066,7 +1066,7 @@ void copy_pose_result(bPose *to, bPose *from) bPoseChannel *pchanto, *pchanfrom; if(to==NULL || from==NULL) { - printf("pose result copy error to:%p from:%p\n", to, from); // debug temp + printf("pose result copy error to:%p from:%p\n", (void *)to, (void *)from); // debug temp return; } diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 77d0f008c2b..817aa57071a 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -304,7 +304,7 @@ void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const ch if ELEM3(NULL, srcAct, dstAct, basepath) { if (G.f & G_DEBUG) { printf("ERROR: action_partition_fcurves_by_basepath(%p, %p, %p) has insufficient info to work with\n", - srcAct, dstAct, basepath); + (void *)srcAct, (void *)dstAct, (void *)basepath); } return; } diff --git a/source/blender/blenkernel/intern/customdata_file.c b/source/blender/blenkernel/intern/customdata_file.c index 6fb79a0df28..0407e7b2b85 100644 --- a/source/blender/blenkernel/intern/customdata_file.c +++ b/source/blender/blenkernel/intern/customdata_file.c @@ -310,11 +310,11 @@ int cdf_read_layer(CDataFile *cdf, CDataFileLayer *blay) return (fseek(cdf->readf, offset, SEEK_SET) == 0); } -int cdf_read_data(CDataFile *cdf, int size, void *data) +int cdf_read_data(CDataFile *cdf, unsigned int size, void *data) { float *fdata; - int a; - + unsigned int a; + /* read data */ if(!fread(data, size, 1, cdf->readf)) return 0; @@ -385,7 +385,7 @@ int cdf_write_layer(CDataFile *UNUSED(cdf), CDataFileLayer *UNUSED(blay)) return 1; } -int cdf_write_data(CDataFile *cdf, int size, void *data) +int cdf_write_data(CDataFile *cdf, unsigned int size, void *data) { /* write data */ if(!fwrite(data, size, 1, cdf->writef)) diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 8b0b7a041dc..f2da2c39b93 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -112,7 +112,7 @@ static int search_face_cmp(const void *v1, const void *v2) } -int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), int totvert, MEdge *medges, int totedge, MFace *mfaces, int totface, const short do_verbose, const short do_fixes) +int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totvert, MEdge *medges, unsigned int totedge, MFace *mfaces, unsigned int totface, const short do_verbose, const short do_fixes) { # define PRINT if(do_verbose) printf # define REMOVE_EDGE_TAG(_med) { _med->v2= _med->v1; do_edge_free= 1; } @@ -122,7 +122,7 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), int totvert, MEdge MEdge *med; MFace *mf; MFace *mf_prev; - int i; + unsigned int i; int do_face_free= FALSE; int do_edge_free= FALSE; @@ -134,7 +134,7 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), int totvert, MEdge SortFace *sort_faces= MEM_callocN(sizeof(SortFace) * totface, "search faces"); SortFace *sf; SortFace *sf_prev; - int totsortface= 0; + unsigned int totsortface= 0; BLI_assert(!(do_fixes && me == NULL)); diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index df012c47f66..b7e01fca8b0 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1494,7 +1494,7 @@ short BKE_nla_tweakmode_enter (AnimData *adt) if ELEM3(NULL, activeTrack, activeStrip, activeStrip->act) { if (G.f & G_DEBUG) { printf("NLA tweakmode enter - neither active requirement found \n"); - printf("\tactiveTrack = %p, activeStrip = %p \n", activeTrack, activeStrip); + printf("\tactiveTrack = %p, activeStrip = %p \n", (void *)activeTrack, (void *)activeStrip); } return 0; } diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 1611116f0af..d84640fe3cd 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -829,7 +829,7 @@ char *scene_find_last_marker_name(Scene *scene, int frame) /* markers need transforming from different parts of the code so have * a generic function to do this */ -int scene_marker_tfm_translate(Scene *scene, int delta, int flag) +int scene_marker_tfm_translate(Scene *scene, int delta, unsigned int flag) { TimeMarker *marker; int tot= 0; diff --git a/source/blender/blenlib/BLI_bpath.h b/source/blender/blenlib/BLI_bpath.h index 2200ec70789..cfe5d7f2084 100644 --- a/source/blender/blenlib/BLI_bpath.h +++ b/source/blender/blenlib/BLI_bpath.h @@ -44,7 +44,7 @@ void BLI_bpathIterator_free (struct BPathIterator *bpi); const char* BLI_bpathIterator_getLib (struct BPathIterator *bpi); const char* BLI_bpathIterator_getName (struct BPathIterator *bpi); int BLI_bpathIterator_getType (struct BPathIterator *bpi); -int BLI_bpathIterator_getPathMaxLen (struct BPathIterator *bpi); +unsigned int BLI_bpathIterator_getPathMaxLen (struct BPathIterator *bpi); const char* BLI_bpathIterator_getBasePath (struct BPathIterator *bpi); void BLI_bpathIterator_step (struct BPathIterator *bpi); int BLI_bpathIterator_isDone (struct BPathIterator *bpi); diff --git a/source/blender/blenlib/BLI_dynstr.h b/source/blender/blenlib/BLI_dynstr.h index ed7a76daa92..2cbc19f56f0 100644 --- a/source/blender/blenlib/BLI_dynstr.h +++ b/source/blender/blenlib/BLI_dynstr.h @@ -79,7 +79,7 @@ void BLI_dynstr_nappend (DynStr *ds, const char *cstr, int len); */ void BLI_dynstr_appendf (DynStr *ds, const char *format, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 2, 3))); +__attribute__ ((format (printf, 2, 3))) #endif ; void BLI_dynstr_vappendf (DynStr *ds, const char *format, va_list args); diff --git a/source/blender/blenlib/BLI_pbvh.h b/source/blender/blenlib/BLI_pbvh.h index bde6bc3ced4..89dcf9bf02d 100644 --- a/source/blender/blenlib/BLI_pbvh.h +++ b/source/blender/blenlib/BLI_pbvh.h @@ -122,7 +122,7 @@ void BLI_pbvh_update(PBVH *bvh, int flags, float (*face_nors)[3]); void BLI_pbvh_redraw_BB(PBVH *bvh, float bb_min[3], float bb_max[3]); void BLI_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *totface); void BLI_pbvh_grids_update(PBVH *bvh, struct DMGridData **grids, - struct DMGridAdjacency *gridadj, void **gridfaces);; + struct DMGridAdjacency *gridadj, void **gridfaces); /* vertex deformer */ float (*BLI_pbvh_get_vertCos(struct PBVH *pbvh))[3]; diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index 36835e0c9ca..4694f4c413f 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -108,7 +108,7 @@ char *BLI_replacestr(char *str, const char *oldText, const char *newText); */ int BLI_snprintf(char *buffer, size_t count, const char *format, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 3, 4))); +__attribute__ ((format (printf, 3, 4))) #endif ; @@ -118,7 +118,7 @@ __attribute__ ((format (printf, 3, 4))); */ char *BLI_sprintfN(const char *format, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 1, 2))); +__attribute__ ((format (printf, 1, 2))) #endif ; diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index 7fa88704f2e..c1e110dbe03 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -194,7 +194,7 @@ const char* BLI_bpathIterator_getName(struct BPathIterator *bpi) { int BLI_bpathIterator_getType(struct BPathIterator *bpi) { return bpi->type; } -int BLI_bpathIterator_getPathMaxLen(struct BPathIterator *bpi) { +unsigned int BLI_bpathIterator_getPathMaxLen(struct BPathIterator *bpi) { return bpi->len; } const char* BLI_bpathIterator_getBasePath(struct BPathIterator *bpi) { diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 97712639a6c..d07705ee501 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -53,8 +53,10 @@ #if defined WIN32 && !defined _LIBC # include "BLI_fnmatch.h" /* use fnmatch included in blenlib */ #else -# define _GNU_SOURCE -# include <fnmatch.h> +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# endif +# include <fnmatch.h> #endif #ifdef WIN32 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) diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index f02ea29d5e2..946bbfece92 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -938,12 +938,12 @@ int RNA_function_call_lookup(struct bContext *C, struct ReportList *reports, Poi int RNA_function_call_direct(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 5, 6))); +__attribute__ ((format (printf, 5, 6))) #endif ; int RNA_function_call_direct_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, const char *identifier, const char *format, ...) #ifdef __GNUC__ -__attribute__ ((format (printf, 5, 6))); +__attribute__ ((format (printf, 5, 6))) #endif ; int RNA_function_call_direct_va(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, va_list args); diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c index d028fede25f..aea2197d8de 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c @@ -170,7 +170,7 @@ static void node_composit_exec_chroma_matte(void *data, bNode *node, bNodeStack if(cbuf!=in[0]->data) free_compbuf(cbuf); -}; +} static void node_composit_init_chroma_matte(bNode *node) @@ -182,7 +182,7 @@ static void node_composit_init_chroma_matte(bNode *node) c->t3= 0.0f; c->fsize= 0.0f; c->fstrength= 1.0f; -}; +} void register_node_type_cmp_chroma_matte(ListBase *lb) { diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c index 5022c25819c..12092531edf 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c @@ -99,7 +99,7 @@ static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack * if(cbuf!=in[0]->data) free_compbuf(cbuf); -}; +} static void node_composit_init_color_matte(bNode *node) { @@ -110,7 +110,7 @@ static void node_composit_init_color_matte(bNode *node) c->t3= 0.1f; c->fsize= 0.0f; c->fstrength= 1.0f; -}; +} void register_node_type_cmp_color_matte(ListBase *lb) { diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c b/source/blender/nodes/intern/CMP_nodes/CMP_curves.c index 3c6fc72488f..2252693da32 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_curves.c @@ -93,12 +93,12 @@ static void node_composit_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeS /* stack order output: vec */ curvemapping_evaluate_premulRGBF(node->storage, out[0]->vec, in[0]->vec); -}; +} static void node_composit_init_curve_vec(bNode* node) { node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f); -}; +} void register_node_type_cmp_curve_vec(ListBase *lb) { @@ -180,12 +180,12 @@ static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeS out[0]->data= stackbuf; } -}; +} static void node_composit_init_curve_rgb(bNode* node) { node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); -}; +} void register_node_type_cmp_curve_rgb(ListBase *lb) { diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c index bb01f591512..dedba6919ab 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c @@ -136,7 +136,7 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i } */ return stackbuf; -}; +} static CompBuf *node_composit_get_zimage(bNode *node, RenderData *rd) { @@ -153,7 +153,7 @@ static CompBuf *node_composit_get_zimage(bNode *node, RenderData *rd) } } return zbuf; -}; +} /* check if layer is available, returns pass buffer */ static CompBuf *compbuf_multilayer_get(RenderData *rd, RenderLayer *rl, Image *ima, ImageUser *iuser, int passtype) @@ -175,7 +175,7 @@ static CompBuf *compbuf_multilayer_get(RenderData *rd, RenderLayer *rl, Image *i return cbuf; } return NULL; -}; +} static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack **out, Image *ima, ImageUser *iuser) { @@ -212,7 +212,7 @@ static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack * out[RRES_OUT_EMIT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_EMIT); if(out[RRES_OUT_ENV]->hasoutput) out[RRES_OUT_ENV]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_ENVIRONMENT); -}; +} static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) @@ -285,7 +285,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE generate_preview(data, node, stackbuf); } } -}; +} static void node_composit_init_image(bNode* node) { @@ -337,7 +337,7 @@ static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, in return buf; } return NULL; -}; +} static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStack **out, int rectx, int recty) { @@ -374,7 +374,7 @@ static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStac out[RRES_OUT_EMIT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_EMIT); if(out[RRES_OUT_ENV]->hasoutput) out[RRES_OUT_ENV]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_ENVIRONMENT); -}; +} static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) { @@ -423,7 +423,7 @@ static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNU if(re) RE_ReleaseResult(re); -}; +} void register_node_type_cmp_rlayers(ListBase *lb) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c index 42430ffeff8..6ab07828735 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c @@ -101,7 +101,7 @@ static void node_composit_init_luma_matte(bNode *node) node->storage=c; c->t1= 1.0f; c->t2= 0.0f; -}; +} void register_node_type_cmp_luma_matte(ListBase *lb) { diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c b/source/blender/nodes/intern/CMP_nodes/CMP_scale.c index 6f030d3d7b3..24d3ca17a0f 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_scale.c @@ -107,7 +107,7 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b if(cbuf!=in[0]->data) free_compbuf(cbuf); } -}; +} void register_node_type_cmp_scale(ListBase *lb) { diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c b/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c index ff17a27d5e5..cae619b8dd4 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c @@ -88,7 +88,7 @@ static void node_composit_init_vecblur(bNode* node) node->storage= nbd; nbd->samples= 32; nbd->fac= 1.0f; -}; +} /* custom1: itterations, custom2: maxspeed (0 = nolimit) */ void register_node_type_cmp_vecblur(ListBase *lb) diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c index 28497b98197..93cdabc22ba 100644 --- a/source/blender/nodes/intern/CMP_util.c +++ b/source/blender/nodes/intern/CMP_util.c @@ -118,7 +118,7 @@ void free_compbuf(CompBuf *cbuf) void print_compbuf(char *str, CompBuf *cbuf) { - printf("Compbuf %s %d %d %p\n", str, cbuf->x, cbuf->y, cbuf->rect); + printf("Compbuf %s %d %d %p\n", str, cbuf->x, cbuf->y, (void *)cbuf->rect); } diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c b/source/blender/nodes/intern/TEX_nodes/TEX_proc.c index 084ce045203..79004f4e64c 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_proc.c @@ -306,13 +306,13 @@ void register_node_type_tex_proc_##name(ListBase *lb) \ #define C outputs_color_only #define CV outputs_both -TexDef(TEX_VORONOI, CV, voronoi, "Voronoi" ); -TexDef(TEX_BLEND, C, blend, "Blend" ); -TexDef(TEX_MAGIC, C, magic, "Magic" ); -TexDef(TEX_MARBLE, CV, marble, "Marble" ); -TexDef(TEX_CLOUDS, CV, clouds, "Clouds" ); -TexDef(TEX_WOOD, CV, wood, "Wood" ); -TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave" ); -TexDef(TEX_NOISE, C, noise, "Noise" ); -TexDef(TEX_STUCCI, CV, stucci, "Stucci" ); -TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise" ); +TexDef(TEX_VORONOI, CV, voronoi, "Voronoi" ) +TexDef(TEX_BLEND, C, blend, "Blend" ) +TexDef(TEX_MAGIC, C, magic, "Magic" ) +TexDef(TEX_MARBLE, CV, marble, "Marble" ) +TexDef(TEX_CLOUDS, CV, clouds, "Clouds" ) +TexDef(TEX_WOOD, CV, wood, "Wood" ) +TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave" ) +TexDef(TEX_NOISE, C, noise, "Noise" ) +TexDef(TEX_STUCCI, CV, stucci, "Stucci" ) +TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise" ) diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index 4d7fe5906c9..8f5af1e366e 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -233,6 +233,8 @@ static char *copy_values(PyObject *seq, PointerRNA *ptr, PropertyRNA *prop, int int totdim= RNA_property_array_dimension(ptr, prop, NULL); const int seq_size= PySequence_Size(seq); + assert(seq_size != -1); + for (i= 0; i < seq_size; i++) { PyObject *item= PySequence_GetItem(seq, i); |