comment some dead assibnment and set dummy values for image profile conversion in...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 20 Jan 2012 15:18:57 +0000 (15:18 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 20 Jan 2012 15:18:57 +0000 (15:18 +0000)
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/text.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/imbuf/intern/divers.c
source/blender/makesrna/intern/rna_tracking.c
source/blender/modifiers/intern/MOD_solidify.c

index eb7d07a6f7de1f26f6af7b4851f2cd4b7a8d0a5a..b2385a5cdb8a8aaec2ad0f063ceff12d174954c1 100644 (file)
@@ -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;
index 1fe385dbf81c3a962c642a039694560bd5ecb864..b8f37a90a4d5839d20605d9ec8b8367587a8f8dd 100644 (file)
@@ -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;
index d7d9a62ec295c21c7e12148570cdfe08611f29e0..03dc906a84b0859a35c228adcdf44895a5fd79c1 100644 (file)
@@ -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) {
index 04748ae3413b09d3f6fab202dea93dcb6db6bee5..c4716f2e3ca2cf6efd2bdc23f221326b98c5c9e4 100644 (file)
@@ -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++;
index 7e086716d3e064bf18001baba1d42e9534d1e1de..a8ca282de66fc8bd99488fc5779908f13c13e837 100644 (file)
@@ -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) {
index 01f3889d684a0d516c7d47ec6ac2071dd8c1eb39..5573ceccf8f713ededa4eb85d829b477728c50cf 100644 (file)
@@ -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);
index 99f5117e3cd0c77c442002c84a57dd651c8a93b7..d16fa0c503cdf7f520b3b4170bc0ed08c44cea36 100644 (file)
@@ -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];