diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-20 19:18:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-20 19:18:57 +0400 |
commit | 172685322638f92906ef3baf39d92399903bdfb3 (patch) | |
tree | ff6ebdc4d1fa942adfd0d01b589d36b91120042f | |
parent | 605aa16dd76c8c2e6eb62dc1686af81e40568c81 (diff) |
comment some dead assibnment and set dummy values for image profile conversion in case of invalid input.
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 1 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify.c | 2 |
7 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index eb7d07a6f7d..b2385a5cdb8 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -377,7 +377,7 @@ static int setkeys(float fac, ListBase *lb, KeyBlock *k[], float *t, int cycl) if(k1->next==NULL) k[0]=k1; k1=k1->next; } - k1= k[1]; + /* k1= k[1]; */ /* UNUSED */ t[0]= k[0]->pos; t[1]+= dpos; t[2]= k[2]->pos + dpos; diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 1fe385dbf81..b8f37a90a4d 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -1944,6 +1944,10 @@ static unsigned int txt_redo_read_unicode(const char *undo_buf, int *undo_pos, s break; case 4: /* 32-bit unicode symbol */ unicode= txt_undo_read_uint32(undo_buf, undo_pos); + default: + /* should never happen */ + BLI_assert(0); + unicode= 0; } return unicode; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index d7d9a62ec29..03dc906a84b 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3239,6 +3239,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve /* re initialize */ project_int_noclip(ar, fp, mval); flip= initgrabz(rv3d, fp[0], fp[1], fp[2]); + (void)flip; } if(mval[0]!=IS_CLIPPED) { diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 04748ae3413..c4716f2e3ca 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1067,7 +1067,7 @@ static int stitch_init(bContext *C, wmOperator *op) ghi = BLI_ghashIterator_new(edgeHash); total_edges = 0; /* fill the edges with data */ - for(i = 0; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)){ + for(; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)){ UvEdge *edge = ((UvEdge *)BLI_ghashIterator_getKey(ghi)); if(edge->flag & STITCH_BOUNDARY){ total_edges++; diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 7e086716d3e..a8ca282de66 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -645,15 +645,19 @@ void IMB_convert_profile(ImBuf *ibuf, int profile) profile_from = IB_PROFILE_LINEAR_RGB; else if(ELEM(ibuf->profile, IB_PROFILE_SRGB, IB_PROFILE_NONE)) profile_from = IB_PROFILE_SRGB; - else + else { BLI_assert(0); + profile_from = IB_PROFILE_SRGB; /* dummy, should never happen */ + } if(profile == IB_PROFILE_LINEAR_RGB) profile_to = IB_PROFILE_LINEAR_RGB; else if(ELEM(profile, IB_PROFILE_SRGB, IB_PROFILE_NONE)) profile_to = IB_PROFILE_SRGB; - else + else { BLI_assert(0); + profile_to = IB_PROFILE_SRGB; /* dummy, should never happen */ + } /* do conversion */ if(ibuf->rect_float) { diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 01f3889d684..5573ceccf8f 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -1232,7 +1232,7 @@ static void rna_def_trackingObjects(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "remove", "rna_trackingObject_remove"); RNA_def_function_ui_description(func, "Remove tracking object from this movie clip"); - parm= RNA_def_pointer(func, "object", "MovieTrackingObject", "", "Motion tracking object to be removed"); + RNA_def_pointer(func, "object", "MovieTrackingObject", "", "Motion tracking object to be removed"); /* active object */ prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 99f5117e3cd..d16fa0c503c 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -583,7 +583,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, /* faces */ mf= mface + (numFaces * 2); - origindex= result->getFaceDataArray(result, CD_ORIGINDEX); + for(i=0; i<newFaces; i++, mf++) { int eidx= new_edge_arr[i]; int fidx= edge_users[eidx]; |