diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-21 03:03:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-21 03:03:41 +0400 |
commit | a98a75346c592bc0f44f40d7bb149bd31186b715 (patch) | |
tree | 29b7912beefb29bec03a1a3de0d44c0a4d1d5eb4 /source/blender/editors | |
parent | f08a8c5b156a5a26c5f7428b77e803edef09cdab (diff) |
quiet warnings and possible NULL checking crash fix for indentation functions.
Diffstat (limited to 'source/blender/editors')
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 9ec27b69835..a8978a0bbde 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -450,7 +450,7 @@ static void renameTemplateBone(char *name, char *template_name, ListBase *editbo { int i, j; - for (i = 0, j = 0; template_name[i] != '\0' && i < (MAXBONENAME-1) && j < (MAXBONENAME-1); i++) + for (i = 0, j = 0; i < (MAXBONENAME-1) && j < (MAXBONENAME-1) && template_name[i] != '\0'; i++) { if (template_name[i] == '&') { diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 4c028612320..57981431492 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -1061,7 +1061,6 @@ ID *buttons_context_id_path(const bContext *C) if(ptr->id.data) { return ptr->id.data; - break; } } } diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index b0c2de390a2..7702e952e24 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -96,8 +96,8 @@ static int script_reload_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; #else (void)C; /* unused */ -#endif return OPERATOR_CANCELLED; +#endif } void SCRIPT_OT_reload(wmOperatorType *ot) diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index c4716f2e3ca..3731d348522 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -912,12 +912,13 @@ static void stitch_select_uv(UvElement *element, StitchState *stitch_state, int } } -static void stitch_calculate_edge_normal(EditMesh *em, UvEdge *edge, float *normal){ +static void stitch_calculate_edge_normal(EditMesh *em, UvEdge *edge, float *normal) +{ UvElement *element = edge->element; EditFace *efa = element->face; MTFace *mt = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); int nverts = efa->v4?4 : 3; - int index = index = (element->tfindex + 2)%nverts; + int index = (element->tfindex + 2)%nverts; float tangent[2], internal[2]; sub_v2_v2v2(tangent, mt->uv[(element->tfindex + 1)%nverts], mt->uv[element->tfindex]); |