comment some unused vars / assignments.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 22 Sep 2011 03:14:50 +0000 (03:14 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 22 Sep 2011 03:14:50 +0000 (03:14 +0000)
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/multires.c
source/blender/editors/curve/editcurve.c
source/blender/imbuf/intern/jpeg.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/shadeoutput.c

index 218b83fc52a2cb755d1678f763d5016656c7a4c3..27ea1585e4b776d40e2aa8b9b920c03b7e098402 100644 (file)
@@ -318,6 +318,8 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
        set_scene_bg(G.main, CTX_data_scene(C));
        
        MEM_freeN(bfd);
+
+       (void)curscene; /* quiet warning */
 }
 
 static int handle_subversion_warning(Main *main, ReportList *reports)
index e621e800520863d526ebafa85cfa42a98e4f090b..cd264c5ddfdefaf4c850c18c47473f269817ae6a 100644 (file)
@@ -1408,7 +1408,7 @@ static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
                }
 
                /* Interior face verts */
-               lvl = lvl1->next->next;
+               /* lvl = lvl1->next->next; */ /* UNUSED */
                dst = 0;
                for(j = 0; j < lvl1->totface; ++j) {
                        int sides = lvl1->faces[j].v[3] ? 4 : 3;
index 84df77bb120fa3e0a2f6225e00c6c48bf3b6a4ef..75188411f4122a0a7abbadf0a6ea3bfae9e4c618 100644 (file)
@@ -2376,7 +2376,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
        BezTriple *bezt;
        BPoint *bp;
        int a;
-       short lastsel= 0, sel=0;
+       short lastsel= 0;
        
        if(next==0) return;
        
@@ -2388,13 +2388,12 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
                        if(next < 0) bezt= (nu->bezt + (a-1));
                        while(a--) {
                                if(a-abs(next) < 0) break;
-                               sel= 0;
                                if((lastsel==0) && (bezt->hide==0) && ((bezt->f2 & SELECT) || (selstatus==0))) {
                                        bezt+=next;
                                        if(!(bezt->f2 & SELECT) || (selstatus==0)) {
-                                               sel= select_beztriple(bezt, selstatus, 1, VISIBLE);     
+                                               short sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
                                                if((sel==1) && (cont==0)) lastsel= 1;
-                                       }                                                       
+                                       }
                                }
                                else {
                                        bezt+=next;
@@ -2410,11 +2409,10 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
                        if(next < 0) bp= (nu->bp + (a-1));
                        while(a--) {
                                if(a-abs(next) < 0) break;
-                               sel=0;
                                if((lastsel==0) && (bp->hide==0) && ((bp->f1 & SELECT) || (selstatus==0))) {
                                        bp+=next;
                                        if(!(bp->f1 & SELECT) || (selstatus==0)) {
-                                               sel= select_bpoint(bp, selstatus, 1, VISIBLE);
+                                               short sel= select_bpoint(bp, selstatus, 1, VISIBLE);
                                                if((sel==1) && (cont==0)) lastsel= 1;
                                        }                       
                                }
@@ -2443,7 +2441,6 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
        BezTriple *bezt;
        Curve *cu;
        int a;
-       short sel;
 
        if(obedit==NULL) return;
 
@@ -2451,7 +2448,6 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
        cu->lastsel= NULL;
 
        for(nu= editnurb->first; nu; nu= nu->next) {
-               sel= 0;
                if(nu->type == CU_BEZIER) {
                        a= nu->pntsu;
                        
@@ -2464,6 +2460,7 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
                        }
                        
                        while(a--) {
+                               short sel;
                                if(doswap) sel= swap_selection_beztriple(bezt);
                                else sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
                                
@@ -2483,6 +2480,7 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
 
                        while(a--) {
                                if (bp->hide == 0) {
+                                       short sel;
                                        if(doswap) sel= swap_selection_bpoint(bp);
                                        else sel= select_bpoint(bp, selstatus, 1, VISIBLE);
                                        
index 0759d97e69ffffa3a93e646e60d07282c9c3125c..b87b46ca464593cef35547e254a1bf73d7fc0d09 100644 (file)
@@ -255,12 +255,12 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t
 static boolean
 handle_app1 (j_decompress_ptr cinfo)
 {
-       INT32 length, i;
+       INT32 length; /* initialized by the macro */
+       INT32 i;
        char neogeo[128];
        
        INPUT_VARS(cinfo);
-       
-       length = 0;
+
        INPUT_2BYTES(cinfo, length, return FALSE);
        length -= 2;
        
index 816a7ba9cd43963945fb0c3d6b00f47288ac7c3e..85ad6b231aaa8eb6ef0413989b7f9b4c2a3c0eca 100644 (file)
@@ -84,7 +84,7 @@ static void api_ui_item_common(FunctionRNA *func)
 {
        PropertyRNA *prop;
 
-       prop= RNA_def_string_translate(func, "text", "", 0, "", "Override automatic text of the item");
+       RNA_def_string_translate(func, "text", "", 0, "", "Override automatic text of the item");
 
        prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_items(prop, icon_items);
index cac2a38680178f40bd6f6d53bf1993b8337f0195..f7028fbeafd7a0c8af45979a499a0d8972b50dd6 100644 (file)
@@ -52,8 +52,6 @@ static void do_luma_matte(bNode *node, float *out, float *in)
        NodeChroma *c=(NodeChroma *)node->storage;
        float alpha;
 
-       alpha=0.0;
-
        /* test range*/
        if(in[0]>c->t1) {
                alpha=1.0;
index 5c5162d268bfd4ea3f373f859b368c7ce814490e..930389841158ad03be081878c8745465c5bbe58a 100644 (file)
@@ -226,8 +226,7 @@ static void render_lighting_halo(HaloRen *har, float col_r[3])
                }
                
                /* shadow  */
-               if(i> -0.41f) {                 /* heuristic valua! */
-                       shadfac= 1.0;
+               if(i> -0.41f) { /* heuristic valua! */
                        if(lar->shb) {
                                shadfac = testshadowbuf(&R, lar->shb, rco, dco, dco, inp, 0.0f);
                                if(shadfac==0.0f) continue;
index 41d12c6065e21fe19ed1aaae9624478a52d4d1e6..c808d930e7c875ed4e7320ef98e48a68abd62f20 100644 (file)
@@ -726,7 +726,7 @@ static float Toon_Diff( float *n, float *l, float *UNUSED(v), float size, float
 /* in latter case, only last multiplication uses 'nl' */
 static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough )
 {
-       float i/*, nh*/, nv, vh, realnl, h[3];
+       float i/*, nh*/, nv /*, vh */, realnl, h[3];
        float a, b, t, A, B;
        float Lit_A, View_A, Lit_B[3], View_B[3];
        
@@ -745,8 +745,8 @@ static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough
        if(realnl<=0.0f) return 0.0f;
        if(nl<0.0f) return 0.0f;                /* value from area light */
        
-       vh= v[0]*h[0]+v[1]*h[1]+v[2]*h[2]; /* Dot product between view vector and halfway vector */
-       if(vh<=0.0f) vh= 0.0f;
+       /* vh= v[0]*h[0]+v[1]*h[1]+v[2]*h[2]; */ /* Dot product between view vector and halfway vector */
+       /* if(vh<=0.0f) vh= 0.0f; */
        
        Lit_A = saacos(realnl);
        View_A = saacos( nv );