comment some unused vars / assignments.

This commit is contained in:
Campbell Barton 2011-09-22 03:14:50 +00:00
parent 0bc5fef976
commit 86d528afa7
8 changed files with 17 additions and 20 deletions

@ -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)); set_scene_bg(G.main, CTX_data_scene(C));
MEM_freeN(bfd); MEM_freeN(bfd);
(void)curscene; /* quiet warning */
} }
static int handle_subversion_warning(Main *main, ReportList *reports) static int handle_subversion_warning(Main *main, ReportList *reports)

@ -1408,7 +1408,7 @@ static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
} }
/* Interior face verts */ /* Interior face verts */
lvl = lvl1->next->next; /* lvl = lvl1->next->next; */ /* UNUSED */
dst = 0; dst = 0;
for(j = 0; j < lvl1->totface; ++j) { for(j = 0; j < lvl1->totface; ++j) {
int sides = lvl1->faces[j].v[3] ? 4 : 3; int sides = lvl1->faces[j].v[3] ? 4 : 3;

@ -2376,7 +2376,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
BezTriple *bezt; BezTriple *bezt;
BPoint *bp; BPoint *bp;
int a; int a;
short lastsel= 0, sel=0; short lastsel= 0;
if(next==0) return; 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)); if(next < 0) bezt= (nu->bezt + (a-1));
while(a--) { while(a--) {
if(a-abs(next) < 0) break; if(a-abs(next) < 0) break;
sel= 0;
if((lastsel==0) && (bezt->hide==0) && ((bezt->f2 & SELECT) || (selstatus==0))) { if((lastsel==0) && (bezt->hide==0) && ((bezt->f2 & SELECT) || (selstatus==0))) {
bezt+=next; bezt+=next;
if(!(bezt->f2 & SELECT) || (selstatus==0)) { 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; if((sel==1) && (cont==0)) lastsel= 1;
} }
} }
else { else {
bezt+=next; 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)); if(next < 0) bp= (nu->bp + (a-1));
while(a--) { while(a--) {
if(a-abs(next) < 0) break; if(a-abs(next) < 0) break;
sel=0;
if((lastsel==0) && (bp->hide==0) && ((bp->f1 & SELECT) || (selstatus==0))) { if((lastsel==0) && (bp->hide==0) && ((bp->f1 & SELECT) || (selstatus==0))) {
bp+=next; bp+=next;
if(!(bp->f1 & SELECT) || (selstatus==0)) { 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; if((sel==1) && (cont==0)) lastsel= 1;
} }
} }
@ -2443,7 +2441,6 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
BezTriple *bezt; BezTriple *bezt;
Curve *cu; Curve *cu;
int a; int a;
short sel;
if(obedit==NULL) return; if(obedit==NULL) return;
@ -2451,7 +2448,6 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
cu->lastsel= NULL; cu->lastsel= NULL;
for(nu= editnurb->first; nu; nu= nu->next) { for(nu= editnurb->first; nu; nu= nu->next) {
sel= 0;
if(nu->type == CU_BEZIER) { if(nu->type == CU_BEZIER) {
a= nu->pntsu; a= nu->pntsu;
@ -2464,6 +2460,7 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
} }
while(a--) { while(a--) {
short sel;
if(doswap) sel= swap_selection_beztriple(bezt); if(doswap) sel= swap_selection_beztriple(bezt);
else sel= select_beztriple(bezt, selstatus, 1, VISIBLE); 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--) { while(a--) {
if (bp->hide == 0) { if (bp->hide == 0) {
short sel;
if(doswap) sel= swap_selection_bpoint(bp); if(doswap) sel= swap_selection_bpoint(bp);
else sel= select_bpoint(bp, selstatus, 1, VISIBLE); else sel= select_bpoint(bp, selstatus, 1, VISIBLE);

@ -255,12 +255,12 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t
static boolean static boolean
handle_app1 (j_decompress_ptr cinfo) handle_app1 (j_decompress_ptr cinfo)
{ {
INT32 length, i; INT32 length; /* initialized by the macro */
INT32 i;
char neogeo[128]; char neogeo[128];
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
length = 0;
INPUT_2BYTES(cinfo, length, return FALSE); INPUT_2BYTES(cinfo, length, return FALSE);
length -= 2; length -= 2;

@ -84,7 +84,7 @@ static void api_ui_item_common(FunctionRNA *func)
{ {
PropertyRNA *prop; 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); prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, icon_items); RNA_def_property_enum_items(prop, icon_items);

@ -52,8 +52,6 @@ static void do_luma_matte(bNode *node, float *out, float *in)
NodeChroma *c=(NodeChroma *)node->storage; NodeChroma *c=(NodeChroma *)node->storage;
float alpha; float alpha;
alpha=0.0;
/* test range*/ /* test range*/
if(in[0]>c->t1) { if(in[0]>c->t1) {
alpha=1.0; alpha=1.0;

@ -226,8 +226,7 @@ static void render_lighting_halo(HaloRen *har, float col_r[3])
} }
/* shadow */ /* shadow */
if(i> -0.41f) { /* heuristic valua! */ if(i> -0.41f) { /* heuristic valua! */
shadfac= 1.0;
if(lar->shb) { if(lar->shb) {
shadfac = testshadowbuf(&R, lar->shb, rco, dco, dco, inp, 0.0f); shadfac = testshadowbuf(&R, lar->shb, rco, dco, dco, inp, 0.0f);
if(shadfac==0.0f) continue; if(shadfac==0.0f) continue;

@ -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' */ /* in latter case, only last multiplication uses 'nl' */
static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough ) 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 a, b, t, A, B;
float Lit_A, View_A, Lit_B[3], View_B[3]; 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(realnl<=0.0f) return 0.0f;
if(nl<0.0f) return 0.0f; /* value from area light */ 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 */ /* 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; /* if(vh<=0.0f) vh= 0.0f; */
Lit_A = saacos(realnl); Lit_A = saacos(realnl);
View_A = saacos( nv ); View_A = saacos( nv );