Fix even more 'set but not used' warnings and a regression.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29873 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2011-05-13 19:23:27 +00:00
parent 4f4edd89e4
commit 2aa0759077
3 changed files with 32 additions and 9 deletions

View file

@ -110,9 +110,12 @@ void hlshelf_check(t_hlshelf *x)
void hlshelf_bang(t_hlshelf *x) void hlshelf_bang(t_hlshelf *x)
{ {
t_atom at[6]; t_atom at[6];
/* float c0; unused */ #ifndef ROCKBOX
float c0;
float g1, g2;
#endif
float c1, c2, d0, d1, d2; /* output coefs */ float c1, c2, d0, d1, d2; /* output coefs */
float a1, a2, b1, b2, g1, g2; /* temp coefs */ float a1, a2, b1, b2; /* temp coefs */
double xf; double xf;
hlshelf_check(x); hlshelf_check(x);
@ -123,7 +126,9 @@ void hlshelf_bang(t_hlshelf *x)
{ {
a1 = 1.0f; a1 = 1.0f;
b1 = -1.0f; b1 = -1.0f;
#ifndef ROCKBOX
g1 = 0.0f; g1 = 0.0f;
#endif
} }
else else
{ {
@ -134,7 +139,9 @@ void hlshelf_bang(t_hlshelf *x)
a1 = (r - 1) / (r + 1); a1 = (r - 1) / (r + 1);
b1 = (kr - 1) / (kr + 1); b1 = (kr - 1) / (kr + 1);
#ifndef ROCKBOX
g1 = (kr + 1) / (r + 1); g1 = (kr + 1) / (r + 1);
#endif
} }
/* high shelf */ /* high shelf */
@ -143,7 +150,9 @@ void hlshelf_bang(t_hlshelf *x)
{ {
a2 = -1.0f; a2 = -1.0f;
b2 = 1.0f; b2 = 1.0f;
#ifndef ROCKBOX
g2 = 0.0f; g2 = 0.0f;
#endif
} }
else else
{ {
@ -154,11 +163,15 @@ void hlshelf_bang(t_hlshelf *x)
a2 = (1 - r) / (1 + r); a2 = (1 - r) / (1 + r);
b2 = (1 - kr) / (1 + kr); b2 = (1 - kr) / (1 + kr);
#ifndef ROCKBOX
g2 = (1 + kr) / (1 + r); g2 = (1 + kr) / (1 + r);
#endif
} }
/* form product */ /* form product */
/* c0 = g1 * g2 * (float)(exp((double)(x->s_gain1) * 0.05f * 2.302585093f)); unused */ #ifndef ROCKBOX
c0 = g1 * g2 * (float)(exp((double)(x->s_gain1) * 0.05f * 2.302585093f));
#endif
c1 = a1 + a2; c1 = a1 + a2;
c2 = a1 * a2; c2 = a1 * a2;
d0 = 1.0f; d0 = 1.0f;
@ -167,7 +180,10 @@ void hlshelf_bang(t_hlshelf *x)
if (!hlshelf_check_stability(-c1/d0,-c2/d0,d0/d0,d1/d0,d2/d0)) { if (!hlshelf_check_stability(-c1/d0,-c2/d0,d0/d0,d1/d0,d2/d0)) {
post("hlshelf: filter unstable -> resetting"); post("hlshelf: filter unstable -> resetting");
/* c0=1.; unused */ c1=0.;c2=0.; #ifndef ROCKBOX
c0=1.;
#endif
c1=0.;c2=0.;
d0=1.;d1=0.;d2=0.; d0=1.;d1=0.;d2=0.;
} }

View file

@ -136,8 +136,10 @@ static t_int *sfwrite_perform(t_int *w)
int i,num,n; int i,num,n;
short* tout = out; short* tout = out;
int ret; int ret;
#ifndef ROCKBOX
int timebefore,timeafter; int timebefore,timeafter;
/* double late; unused */ double late;
#endif
for (i=0;i < c;i++) { for (i=0;i < c;i++) {
in[i] = (t_sample *)(w[2+i]); in[i] = (t_sample *)(w[2+i]);
@ -155,13 +157,17 @@ static t_int *sfwrite_perform(t_int *w)
} }
} }
#ifndef ROCKBOX
timebefore = sys_getrealtime(); timebefore = sys_getrealtime();
#endif
if ((ret =write(x->x_file,out,sizeof(short)*num*c)) < (signed int)sizeof(short)*num*c) { if ((ret =write(x->x_file,out,sizeof(short)*num*c)) < (signed int)sizeof(short)*num*c) {
post("sfwrite: short write %d",ret); post("sfwrite: short write %d",ret);
} }
#ifndef ROCKBOX
timeafter = sys_getrealtime(); timeafter = sys_getrealtime();
/* late = timeafter - timebefore; unused */ late = timeafter - timebefore;
#endif
#if 0 #if 0
/* OK, we let only 10 ms block here */ /* OK, we let only 10 ms block here */

View file

@ -813,14 +813,15 @@ static t_gobj *canvas_findhitbox(t_canvas *x, int xpos, int ypos,
/* right-clicking on a canvas object pops up a menu. */ /* right-clicking on a canvas object pops up a menu. */
static void canvas_rightclick(t_canvas *x, int xpos, int ypos, t_gobj *y) static void canvas_rightclick(t_canvas *x, int xpos, int ypos, t_gobj *y)
{ {
/* int canprop, canopen; unused */
/* canprop = */ (!y || (y && class_getpropertiesfn(pd_class(&y->g_pd))));
/* canopen = */ (y && zgetfn(&y->g_pd, gensym("menu-open")));
#ifdef ROCKBOX #ifdef ROCKBOX
(void) x; (void) x;
(void) xpos; (void) xpos;
(void) ypos; (void) ypos;
(void) y;
#else /* ROCKBOX */ #else /* ROCKBOX */
int canprop, canopen;
canprop = (!y || (y && class_getpropertiesfn(pd_class(&y->g_pd))));
canopen = (y && zgetfn(&y->g_pd, gensym("menu-open")));
sys_vgui("pdtk_canvas_popup .x%x %d %d %d %d\n", sys_vgui("pdtk_canvas_popup .x%x %d %d %d %d\n",
x, xpos, ypos, canprop, canopen); x, xpos, ypos, canprop, canopen);
#endif /* ROCKBOX */ #endif /* ROCKBOX */