diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-22 07:14:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-22 07:14:50 +0400 |
commit | 86d528afa7c54d74162f2ef873da5c62b5c77b52 (patch) | |
tree | fa9b11dc0e81e7628030b0202a64e5eba922e0d0 /source | |
parent | 0bc5fef976270343ee128015f3a2555994b83158 (diff) |
comment some unused vars / assignments.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 2 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 14 | ||||
-rw-r--r-- | source/blender/imbuf/intern/jpeg.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_lummaMatte.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/pixelshading.c | 3 | ||||
-rw-r--r-- | source/blender/render/intern/source/shadeoutput.c | 6 |
8 files changed, 17 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 218b83fc52a..27ea1585e4b 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -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) diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index e621e800520..cd264c5ddfd 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -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; diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 84df77bb120..75188411f41 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -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); diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 0759d97e69f..b87b46ca464 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -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; diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 816a7ba9cd4..85ad6b231aa 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -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); diff --git a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c index cac2a386801..f7028fbeafd 100644 --- a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c @@ -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; diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 5c5162d268b..93038984115 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -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; diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 41d12c6065e..c808d930e7c 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -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 ); |