comment some dead assibnment and set dummy values for image profile conversion in case of invalid input.

This commit is contained in:
Campbell Barton 2012-01-20 15:18:57 +00:00
parent 605aa16dd7
commit 1726853226
7 changed files with 15 additions and 6 deletions

@ -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;

@ -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;

@ -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) {

@ -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++;

@ -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) {

@ -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);

@ -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];