summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pdbox
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-05-13 18:47:42 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-05-13 18:47:42 +0000
commitf7808c1fe5578e0d789fe7d9181e3502482507b8 (patch)
treef1cf93ff36c5a59e676b1fb9fee3e3c25162e497 /apps/plugins/pdbox
parent6484b45d711661c97c5d349065903c40f11ca579 (diff)
downloadrockbox-f7808c1fe5578e0d789fe7d9181e3502482507b8.tar.gz
rockbox-f7808c1fe5578e0d789fe7d9181e3502482507b8.tar.bz2
rockbox-f7808c1fe5578e0d789fe7d9181e3502482507b8.zip
Fix several 'variable set but not used' warnings reported by GCC 6.4.1.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29871 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox')
-rw-r--r--apps/plugins/pdbox/PDa/extra/gcanvas.c8
-rw-r--r--apps/plugins/pdbox/PDa/extra/hlshelf.c7
-rw-r--r--apps/plugins/pdbox/PDa/intern/sfread~.c4
-rw-r--r--apps/plugins/pdbox/PDa/intern/sfwrite~.c4
-rw-r--r--apps/plugins/pdbox/PDa/src/d_ugen.c6
-rw-r--r--apps/plugins/pdbox/PDa/src/g_array.c15
-rw-r--r--apps/plugins/pdbox/PDa/src/g_canvas.c2
-rw-r--r--apps/plugins/pdbox/PDa/src/g_graph.c2
-rw-r--r--apps/plugins/pdbox/PDa/src/g_template.c9
-rw-r--r--apps/plugins/pdbox/PDa/src/g_text.c24
-rw-r--r--apps/plugins/pdbox/PDa/src/m_binbuf.c4
-rw-r--r--apps/plugins/pdbox/PDa/src/m_obj.c4
-rw-r--r--apps/plugins/pdbox/PDa/src/x_connective.c4
13 files changed, 51 insertions, 42 deletions
diff --git a/apps/plugins/pdbox/PDa/extra/gcanvas.c b/apps/plugins/pdbox/PDa/extra/gcanvas.c
index 99f5d3de71..1d40fd207e 100644
--- a/apps/plugins/pdbox/PDa/extra/gcanvas.c
+++ b/apps/plugins/pdbox/PDa/extra/gcanvas.c
@@ -135,7 +135,7 @@ void gcanvas_drawme(t_gcanvas *x, t_glist *glist, int firsttime)
x->x_obj.te_ypix + x->x_height*i/x->x_ygrid,
x->x_width, 0);
}
-
+#ifndef ROCKBOX
{
/* outlets */
int n = 3;
@@ -143,7 +143,6 @@ void gcanvas_drawme(t_gcanvas *x, t_glist *glist, int firsttime)
nplus = (n == 1 ? 1 : n-1);
for (i = 0; i < n; i++)
{
-#ifndef ROCKBOX
int onset = x->x_obj.te_xpix + (x->x_width - IOWIDTH) * i / nplus;
if (firsttime)
sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xo%d\n",
@@ -156,14 +155,12 @@ void gcanvas_drawme(t_gcanvas *x, t_glist *glist, int firsttime)
glist_getcanvas(glist), x, i,
onset, x->x_obj.te_ypix + x->x_height - 1,
onset + IOWIDTH, x->x_obj.te_ypix + x->x_height);
-#endif /* ROCKBOX */
}
/* inlets */
n = 0;
nplus = (n == 1 ? 1 : n-1);
for (i = 0; i < n; i++)
{
-#ifndef ROCKBOX
int onset = x->x_obj.te_xpix + (x->x_width - IOWIDTH) * i / nplus;
if (firsttime)
sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xi%d\n",
@@ -176,10 +173,9 @@ void gcanvas_drawme(t_gcanvas *x, t_glist *glist, int firsttime)
glist_getcanvas(glist), x, i,
onset, x->x_obj.te_ypix,
onset + IOWIDTH, x->x_obj.te_ypix + 1);
-#endif /* ROCKBOX */
}
}
-
+#endif /* ROCKBOX */
}
diff --git a/apps/plugins/pdbox/PDa/extra/hlshelf.c b/apps/plugins/pdbox/PDa/extra/hlshelf.c
index 8a5f82bedd..fd769921d0 100644
--- a/apps/plugins/pdbox/PDa/extra/hlshelf.c
+++ b/apps/plugins/pdbox/PDa/extra/hlshelf.c
@@ -110,7 +110,8 @@ void hlshelf_check(t_hlshelf *x)
void hlshelf_bang(t_hlshelf *x)
{
t_atom at[6];
- float c0, c1, c2, d0, d1, d2; /* output coefs */
+ /* float c0; unused */
+ float c1, c2, d0, d1, d2; /* output coefs */
float a1, a2, b1, b2, g1, g2; /* temp coefs */
double xf;
@@ -157,7 +158,7 @@ void hlshelf_bang(t_hlshelf *x)
}
/* form product */
- c0 = g1 * g2 * (float)(exp((double)(x->s_gain1) * 0.05f * 2.302585093f)); ;
+ /* c0 = g1 * g2 * (float)(exp((double)(x->s_gain1) * 0.05f * 2.302585093f)); unused */
c1 = a1 + a2;
c2 = a1 * a2;
d0 = 1.0f;
@@ -166,7 +167,7 @@ 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.;c1=0.;c2=0.;
+ /* c0=1.; unused */ c1=0.;c2=0.;
d0=1.;d1=0.;d2=0.;
}
diff --git a/apps/plugins/pdbox/PDa/intern/sfread~.c b/apps/plugins/pdbox/PDa/intern/sfread~.c
index b357e49291..0a369ce3f5 100644
--- a/apps/plugins/pdbox/PDa/intern/sfread~.c
+++ b/apps/plugins/pdbox/PDa/intern/sfread~.c
@@ -114,7 +114,7 @@ static t_int *sfread_perform(t_int *w)
{
t_sfread* x = (t_sfread*)(w[1]);
short* buf = x->x_mapaddr;
- t_time tmp;
+ /* t_time tmp; unused */
int c = x->x_channels;
t_time pos = x->x_pos;
t_sample speed = x->x_speed;
@@ -137,7 +137,7 @@ static t_int *sfread_perform(t_int *w)
}
pos = x->x_skip;
}
- tmp = n*speed;
+ /* tmp = n*speed; unused */
if (pos + n*speed <= 0) { // playing backwards end
if (!x->x_loop) {
diff --git a/apps/plugins/pdbox/PDa/intern/sfwrite~.c b/apps/plugins/pdbox/PDa/intern/sfwrite~.c
index c53698c091..6f801921ef 100644
--- a/apps/plugins/pdbox/PDa/intern/sfwrite~.c
+++ b/apps/plugins/pdbox/PDa/intern/sfwrite~.c
@@ -137,7 +137,7 @@ static t_int *sfwrite_perform(t_int *w)
short* tout = out;
int ret;
int timebefore,timeafter;
- double late;
+ /* double late; unused */
for (i=0;i < c;i++) {
in[i] = (t_sample *)(w[2+i]);
@@ -161,7 +161,7 @@ static t_int *sfwrite_perform(t_int *w)
}
timeafter = sys_getrealtime();
- late = timeafter - timebefore;
+ /* late = timeafter - timebefore; unused */
#if 0
/* OK, we let only 10 ms block here */
diff --git a/apps/plugins/pdbox/PDa/src/d_ugen.c b/apps/plugins/pdbox/PDa/src/d_ugen.c
index 189ecb8edc..642ed580bd 100644
--- a/apps/plugins/pdbox/PDa/src/d_ugen.c
+++ b/apps/plugins/pdbox/PDa/src/d_ugen.c
@@ -866,7 +866,7 @@ void ugen_done_graph(t_dspcontext *dc)
t_dspcontext *parent_context = dc->dc_parentcontext;
float parent_srate;
int parent_vecsize;
- int period, frequency, phase, vecsize;
+ int period, frequency, /* phase, */ vecsize;
float srate;
int chainblockbegin; /* DSP chain onset before block prolog code */
int chainblockend; /* and after block epilog code */
@@ -931,7 +931,7 @@ void ugen_done_graph(t_dspcontext *dc)
frequency = (parent_vecsize * realoverlap * upsample)/
(vecsize * downsample);
/* } IOhannes*/
- phase = blk->x_phase;
+ /* phase = blk->x_phase; */
srate = parent_srate * realoverlap * upsample / downsample;
/* IOhannes */
if (period < 1) period = 1;
@@ -951,7 +951,7 @@ void ugen_done_graph(t_dspcontext *dc)
vecsize = parent_vecsize;
downsample = upsample = 1;/* IOhannes */
period = frequency = 1;
- phase = 0;
+ /* phase = 0; */
if (!parent_context) reblock = 1;
switched = 0;
}
diff --git a/apps/plugins/pdbox/PDa/src/g_array.c b/apps/plugins/pdbox/PDa/src/g_array.c
index 484e6fa33d..529feef0e2 100644
--- a/apps/plugins/pdbox/PDa/src/g_array.c
+++ b/apps/plugins/pdbox/PDa/src/g_array.c
@@ -245,13 +245,13 @@ void glist_arraydialog(t_glist *parent, t_symbol *name, t_floatarg size,
t_floatarg saveit, t_floatarg otherflag)
{
t_glist *gl;
- t_garray *a;
+ /* t_garray *a; unused */
if (size < 1)
size = 1;
if (otherflag == 0 || (!(gl = glist_findgraph(parent))))
gl = glist_addglist(parent, &s_, 0, 1,
(size > 1 ? size-1 : size), -1, 0, 0, 0, 0);
- a = graph_array(gl, sharptodollar(name), &s_float, size, saveit);
+ /* a = */ graph_array(gl, sharptodollar(name), &s_float, size, saveit);
}
/* this is called from the properties dialog window for an existing array */
@@ -706,17 +706,22 @@ static void garray_vis(t_gobj *z, t_glist *glist, int vis)
else if (!template_find_field(template, gensym("x"), &xonset, &type,
&arraytype) || type != DT_FLOAT)
{
- float firsty, xcum = x->x_firstx;
+ float xcum = x->x_firstx;
int lastpixel = -1, ndrawn = 0;
- float yval = 0, xpix;
+ float xpix;
+#ifndef ROCKBOX
+ float firsty, yval = 0;
+#endif
int ixpix = 0;
#ifndef ROCKBOX
sys_vgui(".x%x.c create line \\\n", glist_getcanvas(glist));
#endif
for (i = 0; i < x->x_n; i++)
{
+#ifndef ROCKBOX
yval = fixtof(*(t_sample *)(x->x_vec +
template->t_n * i * sizeof (t_word) + yonset));
+#endif
xpix = glist_xtopixels(glist, xcum);
ixpix = xpix + 0.5;
if (ixpix != lastpixel)
@@ -737,9 +742,7 @@ static void garray_vis(t_gobj *z, t_glist *glist, int vis)
else if (ndrawn == 1) sys_vgui("%d %f \\\n", ixpix,
glist_ytopixels(glist, yval));
sys_vgui("-tags .x%x.a%x\n", glist_getcanvas(glist), x);
-#endif
firsty = fixtof(*(t_sample *)(x->x_vec + yonset));
-#ifndef ROCKBOX
sys_vgui(".x%x.c create text %f %f -text {%s} -anchor e\
-font -*-courier-bold--normal--%d-* -tags .x%x.a%x\n",
glist_getcanvas(glist),
diff --git a/apps/plugins/pdbox/PDa/src/g_canvas.c b/apps/plugins/pdbox/PDa/src/g_canvas.c
index a48a28e164..e3774dfd05 100644
--- a/apps/plugins/pdbox/PDa/src/g_canvas.c
+++ b/apps/plugins/pdbox/PDa/src/g_canvas.c
@@ -381,7 +381,7 @@ t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
#ifdef ROCKBOX
(void) dummy;
(void) sel;
- int font = 10;
+ int font __attribute__((unused)) = 10;
#else /* ROCKBOX */
int font = (owner ? owner->gl_font : sys_defaultfont);
#endif /* ROCKBOX */
diff --git a/apps/plugins/pdbox/PDa/src/g_graph.c b/apps/plugins/pdbox/PDa/src/g_graph.c
index 39a2993264..eba2f4f3ba 100644
--- a/apps/plugins/pdbox/PDa/src/g_graph.c
+++ b/apps/plugins/pdbox/PDa/src/g_graph.c
@@ -736,10 +736,12 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
zero, this is disabled. */
if (x->gl_xtick.k_lperb)
{
+#ifndef ROCKBOX
float upix, lpix;
if (y2 < y1)
upix = y1, lpix = y2;
else upix = y2, lpix = y1;
+#endif
for (i = 0, f = x->gl_xtick.k_point;
f < 0.99 * x->gl_x2 + 0.01*x->gl_x1; i++,
f += x->gl_xtick.k_inc)
diff --git a/apps/plugins/pdbox/PDa/src/g_template.c b/apps/plugins/pdbox/PDa/src/g_template.c
index e73ca3ef5a..0245158fce 100644
--- a/apps/plugins/pdbox/PDa/src/g_template.c
+++ b/apps/plugins/pdbox/PDa/src/g_template.c
@@ -1398,7 +1398,10 @@ static void plot_vis(t_gobj *z, t_glist *glist,
{
char outline[20];
int lastpixel = -1, ndrawn = 0;
- float xsum, yval = 0, wval = 0, xpix;
+ float xsum, yval = 0, xpix;
+#ifndef ROCKBOX
+ float wval = 0;
+#endif
int ixpix = 0, i;
/* draw the trace */
@@ -1422,7 +1425,9 @@ static void plot_vis(t_gobj *z, t_glist *glist,
if (yonset >= 0)
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
+#ifndef ROCKBOX
wval = *(float *)((elem + elemsize * i) + wonset);
+#endif
xpix = glist_xtopixels(glist, basex + usexloc);
ixpix = xpix + 0.5;
if (xonset >= 0 || ixpix != lastpixel)
@@ -1447,7 +1452,9 @@ static void plot_vis(t_gobj *z, t_glist *glist,
if (yonset >= 0)
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
+#ifndef ROCKBOX
wval = *(float *)((elem + elemsize * i) + wonset);
+#endif
xpix = glist_xtopixels(glist, basex + usexloc);
ixpix = xpix + 0.5;
if (xonset >= 0 || ixpix != lastpixel)
diff --git a/apps/plugins/pdbox/PDa/src/g_text.c b/apps/plugins/pdbox/PDa/src/g_text.c
index ece0f58763..63105c0aa9 100644
--- a/apps/plugins/pdbox/PDa/src/g_text.c
+++ b/apps/plugins/pdbox/PDa/src/g_text.c
@@ -814,10 +814,10 @@ static void gatom_param(t_gatom *x, t_symbol *sel, int argc, t_atom *argv)
/* ---------------- gatom-specific widget functions --------------- */
static void gatom_getwherelabel(t_gatom *x, t_glist *glist, int *xp, int *yp)
{
- int x1, y1, x2, y2, width, height;
+ int x1, y1, x2, y2 /*, width, height */;
text_getrect(&x->a_text.te_g, glist, &x1, &y1, &x2, &y2);
- width = x2 - x1;
- height = y2 - y1;
+ /* width = x2 - x1; */
+ /* height = y2 - y1; */
if (x->a_wherelabel == ATOM_LABELLEFT)
{
*xp = x1 - 3 -
@@ -1265,9 +1265,9 @@ static t_widgetbehavior gatom_widgetbehavior =
void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
char *tag, int x1, int y1, int x2, int y2)
{
- int n = obj_noutlets(ob), nplus = (n == 1 ? 1 : n-1), i;
#ifdef ROCKBOX
(void) glist;
+ (void) ob;
(void) firsttime;
(void) tag;
(void) x1;
@@ -1275,11 +1275,12 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
(void) x2;
(void) y2;
#else /* ROCKBOX */
+ int n = obj_noutlets(ob), i;
int width = x2 - x1;
-#endif /* ROCKBOX */
+ int nplus = (n == 1 ? 1 : n-1);
+
for (i = 0; i < n; i++)
{
-#ifndef ROCKBOX
int onset = x1 + (width - IOWIDTH) * i / nplus;
if (firsttime)
sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %so%d\n",
@@ -1292,13 +1293,12 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
glist_getcanvas(glist), tag, i,
onset, y2 - 1,
onset + IOWIDTH, y2);
-#endif /* ROCKBOX */
}
+
n = obj_ninlets(ob);
nplus = (n == 1 ? 1 : n-1);
for (i = 0; i < n; i++)
{
-#ifndef ROCKBOX
int onset = x1 + (width - IOWIDTH) * i / nplus;
if (firsttime)
sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %si%d\n",
@@ -1311,15 +1311,15 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
glist_getcanvas(glist), tag, i,
onset, y1,
onset + IOWIDTH, y1 + EXTRAPIX);
-#endif /* ROCKBOX */
}
+#endif /* ROCKBOX */
}
void text_drawborder(t_text *x, t_glist *glist,
char *tag, int width2, int height2, int firsttime)
{
t_object *ob;
- int x1, y1, x2, y2, width, height;
+ int x1, y1, x2, y2 /* , width, height */;
#ifdef ROCKBOX
(void) width2;
@@ -1327,8 +1327,8 @@ void text_drawborder(t_text *x, t_glist *glist,
#endif
text_getrect(&x->te_g, glist, &x1, &y1, &x2, &y2);
- width = x2 - x1;
- height = y2 - y1;
+ /* width = x2 - x1; */
+ /* height = y2 - y1; */
if (x->te_type == T_OBJECT)
{
#ifndef ROCKBOX
diff --git a/apps/plugins/pdbox/PDa/src/m_binbuf.c b/apps/plugins/pdbox/PDa/src/m_binbuf.c
index b7c9a925d4..1665e213b9 100644
--- a/apps/plugins/pdbox/PDa/src/m_binbuf.c
+++ b/apps/plugins/pdbox/PDa/src/m_binbuf.c
@@ -96,13 +96,13 @@ void binbuf_text(t_binbuf *x, char *text, size_t size)
{
/* it's an atom other than a comma or semi */
char c;
- int floatstate = 0, slash = 0, lastslash = 0,
+ int floatstate = 0, slash = 0, /* lastslash = 0, */
firstslash = (*textp == '\\');
bufp = buf;
do
{
c = *bufp = *textp++;
- lastslash = slash;
+ /* lastslash = slash; */
slash = (c == '\\');
if (floatstate >= 0)
diff --git a/apps/plugins/pdbox/PDa/src/m_obj.c b/apps/plugins/pdbox/PDa/src/m_obj.c
index fa17a9052b..994b0bffed 100644
--- a/apps/plugins/pdbox/PDa/src/m_obj.c
+++ b/apps/plugins/pdbox/PDa/src/m_obj.c
@@ -655,9 +655,9 @@ int obj_sigoutletindex(t_object *x, int m)
int obj_issignaloutlet(t_object *x, int m)
{
- int n;
+ /* int n; */
t_outlet *o2;
- for (o2 = x->ob_outlet, n = 0; o2 && m--; o2 = o2->o_next);
+ for (o2 = x->ob_outlet /* , n = 0 */; o2 && m--; o2 = o2->o_next);
return (o2 && (o2->o_sym == &s_signal));
}
diff --git a/apps/plugins/pdbox/PDa/src/x_connective.c b/apps/plugins/pdbox/PDa/src/x_connective.c
index bd504b54a4..f5462db26b 100644
--- a/apps/plugins/pdbox/PDa/src/x_connective.c
+++ b/apps/plugins/pdbox/PDa/src/x_connective.c
@@ -647,7 +647,7 @@ static void *pack_new(t_symbol *s, int argc, t_atom *argv)
(void) s;
#endif
t_pack *x = (t_pack *)pd_new(pack_class);
- t_atom defarg[2], *ap, *vec, *vp;
+ t_atom defarg[2], *ap, /* *vec, */ *vp;
t_gpointer *gp;
int nptr = 0;
int i;
@@ -660,7 +660,7 @@ static void *pack_new(t_symbol *s, int argc, t_atom *argv)
}
x->x_n = argc;
- vec = x->x_vec = (t_atom *)getbytes(argc * sizeof(*x->x_vec));
+ /* vec = */ x->x_vec = (t_atom *)getbytes(argc * sizeof(*x->x_vec));
x->x_outvec = (t_atom *)getbytes(argc * sizeof(*x->x_outvec));
for (i = argc, ap = argv; i--; ap++)