diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-05-13 19:23:27 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-05-13 19:23:27 +0000 |
commit | 2aa0759077ce43b75470eae5be32c102aeea12ce (patch) | |
tree | f7d0aaf38fb862c37ebb4bae75c12c6e2c2c5bad /apps/plugins | |
parent | 4f4edd89e42a50539a140f6290aefd425720e469 (diff) |
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
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/pdbox/PDa/extra/hlshelf.c | 24 | ||||
-rw-r--r-- | apps/plugins/pdbox/PDa/intern/sfwrite~.c | 10 | ||||
-rw-r--r-- | apps/plugins/pdbox/PDa/src/g_editor.c | 7 |
3 files changed, 32 insertions, 9 deletions
diff --git a/apps/plugins/pdbox/PDa/extra/hlshelf.c b/apps/plugins/pdbox/PDa/extra/hlshelf.c index fd769921d0..61ec3a8a77 100644 --- a/apps/plugins/pdbox/PDa/extra/hlshelf.c +++ b/apps/plugins/pdbox/PDa/extra/hlshelf.c @@ -110,9 +110,12 @@ void hlshelf_check(t_hlshelf *x) void hlshelf_bang(t_hlshelf *x) { t_atom at[6]; - /* float c0; unused */ +#ifndef ROCKBOX + float c0; + float g1, g2; +#endif 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; hlshelf_check(x); @@ -123,7 +126,9 @@ void hlshelf_bang(t_hlshelf *x) { a1 = 1.0f; b1 = -1.0f; +#ifndef ROCKBOX g1 = 0.0f; +#endif } else { @@ -134,7 +139,9 @@ void hlshelf_bang(t_hlshelf *x) a1 = (r - 1) / (r + 1); b1 = (kr - 1) / (kr + 1); +#ifndef ROCKBOX g1 = (kr + 1) / (r + 1); +#endif } /* high shelf */ @@ -143,7 +150,9 @@ void hlshelf_bang(t_hlshelf *x) { a2 = -1.0f; b2 = 1.0f; +#ifndef ROCKBOX g2 = 0.0f; +#endif } else { @@ -154,11 +163,15 @@ void hlshelf_bang(t_hlshelf *x) a2 = (1 - r) / (1 + r); b2 = (1 - kr) / (1 + kr); +#ifndef ROCKBOX g2 = (1 + kr) / (1 + r); +#endif } /* 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; c2 = a1 * a2; 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)) { 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.; } diff --git a/apps/plugins/pdbox/PDa/intern/sfwrite~.c b/apps/plugins/pdbox/PDa/intern/sfwrite~.c index 6f801921ef..fb8ef9e109 100644 --- a/apps/plugins/pdbox/PDa/intern/sfwrite~.c +++ b/apps/plugins/pdbox/PDa/intern/sfwrite~.c @@ -136,8 +136,10 @@ static t_int *sfwrite_perform(t_int *w) int i,num,n; short* tout = out; int ret; +#ifndef ROCKBOX int timebefore,timeafter; - /* double late; unused */ + double late; +#endif for (i=0;i < c;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(); +#endif if ((ret =write(x->x_file,out,sizeof(short)*num*c)) < (signed int)sizeof(short)*num*c) { post("sfwrite: short write %d",ret); } +#ifndef ROCKBOX timeafter = sys_getrealtime(); - /* late = timeafter - timebefore; unused */ + late = timeafter - timebefore; +#endif #if 0 /* OK, we let only 10 ms block here */ diff --git a/apps/plugins/pdbox/PDa/src/g_editor.c b/apps/plugins/pdbox/PDa/src/g_editor.c index 6a1fbab13b..90700d59e7 100644 --- a/apps/plugins/pdbox/PDa/src/g_editor.c +++ b/apps/plugins/pdbox/PDa/src/g_editor.c @@ -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. */ 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 (void) x; (void) xpos; (void) ypos; + (void) y; #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", x, xpos, ypos, canprop, canopen); #endif /* ROCKBOX */ |