aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2013-06-03 16:07:32 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2013-06-03 16:07:32 +0000
commitfc89459187380d862daf249c95ed389e3fb6c0d3 (patch)
tree5dda59b117004068bba15c6c54d14046acced4b3
parente7f62cc177e6e3eb2e78ac5c6d5164782054d8ad (diff)
declare unused parameters as such
rather than doing a dummy-usage svn path=/trunk/externals/zexy/; revision=17144
-rw-r--r--src/0x260x260x7e.c7
-rw-r--r--src/0x2e.c9
-rw-r--r--src/0x3c0x7e.c6
-rw-r--r--src/0x3d0x3d0x7e.c7
-rw-r--r--src/0x3e0x7e.c7
-rw-r--r--src/0x7c0x7c0x7e.c7
-rw-r--r--src/absgn~.c3
-rw-r--r--src/atof.c5
-rw-r--r--src/atoi.c8
-rw-r--r--src/date.c6
-rw-r--r--src/demultiplex.c4
-rw-r--r--src/demultiplex~.c4
-rw-r--r--src/drip.c6
-rw-r--r--src/fifop.c3
-rw-r--r--src/glue.c9
-rw-r--r--src/index.c7
-rw-r--r--src/length.c8
-rw-r--r--src/lifop.c3
-rw-r--r--src/list2lists.c3
-rw-r--r--src/listfind.c3
-rw-r--r--src/liststorage.c1
-rw-r--r--src/longload.c1
-rw-r--r--src/lpt.c3
-rw-r--r--src/makesymbol.c9
-rw-r--r--src/mavg.c3
-rw-r--r--src/minmax.c3
-rw-r--r--src/multiline~.c6
-rw-r--r--src/multiplex~.c5
-rw-r--r--src/quantize~.c3
-rw-r--r--src/relay.c3
-rw-r--r--src/repack.c3
-rw-r--r--src/repeat.c3
-rw-r--r--src/sfplay.c3
-rw-r--r--src/strcmp.c9
-rw-r--r--src/sum.c3
-rw-r--r--src/symbol2list.c3
-rw-r--r--src/tabdump.c3
-rw-r--r--src/tabminmax.c3
-rw-r--r--src/tabset.c3
-rw-r--r--src/time.c6
-rw-r--r--src/urn.c3
-rw-r--r--src/wrap.c3
-rw-r--r--src/zexy.h9
43 files changed, 69 insertions, 137 deletions
diff --git a/src/0x260x260x7e.c b/src/0x260x260x7e.c
index 52dccd9..fe8f36c 100644
--- a/src/0x260x260x7e.c
+++ b/src/0x260x260x7e.c
@@ -38,9 +38,8 @@ typedef struct _scalarandand_tilde
t_float x_g; /* inlet value */
} t_scalarandand_tilde;
-static void *andand_tilde_new(t_symbol *s, int argc, t_atom *argv)
+static void *andand_tilde_new(t_symbol * UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if (argc > 1) post("&&~: extra arguments ignored");
if (argc)
{
@@ -216,7 +215,7 @@ static t_int *scalarandand_tilde_performSSE(t_int *w)
}
#endif /* __SSE__ */
-static void andand_tilde_dsp(t_andand_tilde *x, t_signal **sp)
+static void andand_tilde_dsp(t_andand_tilde *UNUSED(x), t_signal **sp)
{
t_sample*in1=sp[0]->s_vec;
t_sample*in2=sp[1]->s_vec;
@@ -240,8 +239,6 @@ static void andand_tilde_dsp(t_andand_tilde *x, t_signal **sp)
dsp_add(andand_tilde_perform, 4, in1, in2, out, n);
else
dsp_add(andand_tilde_perf8, 4, in1, in2, out, n);
-
- ZEXY_USEVAR(x);
}
static void scalarandand_tilde_dsp(t_scalarandand_tilde *x, t_signal **sp)
diff --git a/src/0x2e.c b/src/0x2e.c
index 43b6444..d138ed7 100644
--- a/src/0x2e.c
+++ b/src/0x2e.c
@@ -35,10 +35,9 @@ typedef struct _scalmul
} t_scalmul;
-static void scalmul_lst2(t_scalmul *x, t_symbol *s, int argc, t_atom *argv)
+static void scalmul_lst2(t_scalmul *x, t_symbol *UNUSED(s), int argc, t_atom *argv)
{
t_float *fp;
- ZEXY_USEVAR(s);
if (x->n2 != argc) {
freebytes(x->buf2, x->n2 * sizeof(t_float));
x->n2 = argc;
@@ -48,12 +47,11 @@ static void scalmul_lst2(t_scalmul *x, t_symbol *s, int argc, t_atom *argv)
while(argc--)*fp++=atom_getfloat(argv++);
}
-static void scalmul_lst(t_scalmul *x, t_symbol *s, int argc, t_atom *argv)
+static void scalmul_lst(t_scalmul *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_float *fp;
t_atom *ap;
int n;
- ZEXY_USEVAR(s);
if (argc){
if (x->n1 != argc) {
@@ -120,10 +118,9 @@ static void scalmul_free(t_scalmul *x)
freebytes(x->buf2, sizeof(t_float)*x->n2);
}
-static void *scalmul_new(t_symbol *s, int argc, t_atom *argv)
+static void *scalmul_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_scalmul *x;
- ZEXY_USEVAR(s);
if (argc-1){
x = (t_scalmul *)pd_new(scalmul_class);
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("list"), gensym(""));
diff --git a/src/0x3c0x7e.c b/src/0x3c0x7e.c
index 681bdd9..3a348bd 100644
--- a/src/0x3c0x7e.c
+++ b/src/0x3c0x7e.c
@@ -38,9 +38,8 @@ typedef struct _scalarlt_tilde
t_float x_g; /* inlet value */
} t_scalarlt_tilde;
-static void *lt_tilde_new(t_symbol *s, int argc, t_atom *argv)
+static void *lt_tilde_new(t_symbol *UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if (argc > 1) post("<~: extra arguments ignored");
if (argc)
{
@@ -177,14 +176,13 @@ static t_int *scalarlt_tilde_performSSE(t_int *w)
}
#endif /* __SSE__ */
-static void lt_tilde_dsp(t_lt_tilde *x, t_signal **sp)
+static void lt_tilde_dsp(t_lt_tilde* UNUSED(x), t_signal **sp)
{
t_sample*in1=sp[0]->s_vec;
t_sample*in2=sp[1]->s_vec;
t_sample*out=sp[2]->s_vec;
int n=sp[0]->s_n;
- ZEXY_USEVAR(x);
#ifdef __SSE__
if(
Z_SIMD_CHKBLOCKSIZE(n)&&
diff --git a/src/0x3d0x3d0x7e.c b/src/0x3d0x3d0x7e.c
index 8f3b811..94211dd 100644
--- a/src/0x3d0x3d0x7e.c
+++ b/src/0x3d0x3d0x7e.c
@@ -35,9 +35,8 @@ typedef struct _scalareq_tilde
t_float x_g; /* inlet value */
} t_scalareq_tilde;
-static void *eq_tilde_new(t_symbol *s, int argc, t_atom *argv)
+static void *eq_tilde_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if (argc > 1) post("==~: extra arguments ignored");
if (argc)
{
@@ -175,7 +174,7 @@ static t_int *scalareq_tilde_performSSE(t_int *w)
}
#endif /* __SSE__ */
-static void eq_tilde_dsp(t_eq_tilde *x, t_signal **sp)
+static void eq_tilde_dsp(t_eq_tilde* UNUSED(x), t_signal **sp)
{
t_sample*in1=sp[0]->s_vec;
t_sample*in2=sp[1]->s_vec;
@@ -183,8 +182,6 @@ static void eq_tilde_dsp(t_eq_tilde *x, t_signal **sp)
int n=sp[0]->s_n;
- ZEXY_USEVAR(x);
-
#ifdef __SSE__
if(
Z_SIMD_CHKBLOCKSIZE(n)&&
diff --git a/src/0x3e0x7e.c b/src/0x3e0x7e.c
index 891b748..766778d 100644
--- a/src/0x3e0x7e.c
+++ b/src/0x3e0x7e.c
@@ -38,9 +38,8 @@ typedef struct _scalargt_tilde
t_float x_g; /* inlet value */
} t_scalargt_tilde;
-static void *gt_tilde_new(t_symbol *s, int argc, t_atom *argv)
+static void *gt_tilde_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if (argc > 1) post(">~: extra arguments ignored");
if (argc)
{
@@ -178,7 +177,7 @@ static t_int *scalargt_tilde_performSSE(t_int *w)
#endif /* __SSE__ */
-static void gt_tilde_dsp(t_gt_tilde *x, t_signal **sp)
+static void gt_tilde_dsp(t_gt_tilde* UNUSED(x), t_signal **sp)
{
t_sample*in1=sp[0]->s_vec;
t_sample*in2=sp[1]->s_vec;
@@ -186,8 +185,6 @@ static void gt_tilde_dsp(t_gt_tilde *x, t_signal **sp)
int n=sp[0]->s_n;
- ZEXY_USEVAR(x);
-
#ifdef __SSE__
if(
Z_SIMD_CHKBLOCKSIZE(n)&&
diff --git a/src/0x7c0x7c0x7e.c b/src/0x7c0x7c0x7e.c
index b61d7b8..e0cc4dd 100644
--- a/src/0x7c0x7c0x7e.c
+++ b/src/0x7c0x7c0x7e.c
@@ -35,9 +35,8 @@ typedef struct _scalaroror_tilde
t_float x_g; /* inlet value */
} t_scalaroror_tilde;
-static void *oror_tilde_new(t_symbol *s, int argc, t_atom *argv)
+static void *oror_tilde_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if (argc > 1) post("||~: extra arguments ignored");
if (argc)
{
@@ -191,7 +190,7 @@ static t_int *scalaroror_tilde_performSSE(t_int *w)
}
#endif /* __SSE__ */
-static void oror_tilde_dsp(t_oror_tilde *x, t_signal **sp)
+static void oror_tilde_dsp(t_oror_tilde* UNUSED(x), t_signal **sp)
{
t_sample*in1=sp[0]->s_vec;
t_sample*in2=sp[1]->s_vec;
@@ -199,8 +198,6 @@ static void oror_tilde_dsp(t_oror_tilde *x, t_signal **sp)
int n=sp[0]->s_n;
- ZEXY_USEVAR(x);
-
#ifdef __SSE__
if(
0 && /* disabled for now since SSE2 code not compatible with [||] */
diff --git a/src/absgn~.c b/src/absgn~.c
index ccd9f75..a134aa5 100644
--- a/src/absgn~.c
+++ b/src/absgn~.c
@@ -92,9 +92,8 @@ static t_int *sigABSGN_performSSE(t_int *w)
}
#endif /* __SSE__ */
-static void sigABSGN_dsp(t_absgn *x, t_signal **sp)
+static void sigABSGN_dsp(t_absgn* UNUSED(x), t_signal **sp)
{
- ZEXY_USEVAR(x);
#ifdef __SSE__
if(
ZEXY_TYPE_EQUAL(t_sample, float) && /* currently SSE2 code is only for float (not for double) */
diff --git a/src/atof.c b/src/atof.c
index ab7fcbf..1f95c35 100644
--- a/src/atof.c
+++ b/src/atof.c
@@ -50,11 +50,8 @@ static void atof_symbol(t_atof *x, t_symbol *sym)
outlet_symbol(x->x_reject, sym);
}
}
-static void atof_list(t_atof *x, t_symbol *s, int argc, t_atom *argv)
+static void atof_list(t_atof *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- const char* c;
- ZEXY_USEVAR(s);
-
if(!argc){
atof_bang(x);
return;
diff --git a/src/atoi.c b/src/atoi.c
index ee462ae..153b303 100644
--- a/src/atoi.c
+++ b/src/atoi.c
@@ -52,7 +52,6 @@ static void atoi_atoi(t_atoi *x, t_symbol*s, int base) {
static void atoi_symbol(t_atoi *x, t_symbol *sym)
{
- long l=0;
int base=10;
const char* s = sym->s_name;
if(s[0]=='0'){
@@ -61,12 +60,9 @@ static void atoi_symbol(t_atoi *x, t_symbol *sym)
}
atoi_atoi(x, sym, base);
}
-static void atoi_list(t_atoi *x, t_symbol *sym, int argc, t_atom *argv)
+static void atoi_list(t_atoi *x, t_symbol* s, int argc, t_atom *argv)
{
int base=10;
- const char* s;
- ZEXY_USEVAR(sym);
-
if (argv->a_type==A_FLOAT){
atoi_float(x, atom_getfloat(argv));
return;
@@ -79,7 +75,7 @@ static void atoi_list(t_atoi *x, t_symbol *sym, int argc, t_atom *argv)
base=10;
}
}
- atoi_atoi(x, sym, base);
+ atoi_atoi(x, s, base);
}
static void atoi_free(t_atoi *x){
diff --git a/src/date.c b/src/date.c
index a45cee3..3e2a5f5 100644
--- a/src/date.c
+++ b/src/date.c
@@ -77,11 +77,10 @@ typedef struct _date
t_outlet *x_outlet6;
} t_date;
-static void *date_new(t_symbol *s, int argc, t_atom *argv)
+static void *date_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_date *x = (t_date *)pd_new(date_class);
char buf[5];
- ZEXY_USEVAR(s);
x->GMT=0;
if (argc) {
@@ -120,9 +119,8 @@ static void date_bang(t_date *x)
outlet_float(x->x_outlet1, (t_float)resolvetime->tm_year + 1900);
}
-static void help_date(t_date *x)
+static void help_date(t_date* UNUSED(x))
{
- ZEXY_USEVAR(x);
post("\n"HEARTSYMBOL" date\t\t:: get the current system date");
post("\noutputs are\t: year / month / day / day of week /day of year / daylightsaving (1/0)");
post("\ncreation\t::'date [GMT]': show local date or GMT");
diff --git a/src/demultiplex.c b/src/demultiplex.c
index 199d609..20886f5 100644
--- a/src/demultiplex.c
+++ b/src/demultiplex.c
@@ -74,12 +74,10 @@ static void demux_any(t_demux *x, t_symbol *s, int argc, t_atom *argv)
outlet_anything(x->selected, s, argc, argv);
}
-static void *demux_new(t_symbol *s, int argc, t_atom *argv)
+static void *demux_new(t_symbol* UNUSED(s), int argc, t_atom* UNUSED(argv))
{
t_demux *x = (t_demux *)pd_new(demux_class);
int n = (argc < 2)?2:argc;
- ZEXY_USEVAR(s);
- ZEXY_USEVAR(argv);
x->n_out = n - 1;
diff --git a/src/demultiplex~.c b/src/demultiplex~.c
index 0b2e76c..7d5f0b3 100644
--- a/src/demultiplex~.c
+++ b/src/demultiplex~.c
@@ -82,12 +82,10 @@ static void demux_free(t_demux *x)
freebytes(x->out, x->n_out * sizeof(t_sample *));
}
-static void *demux_new(t_symbol *s, int argc, t_atom *argv)
+static void *demux_new(t_symbol* UNUSED(s), int argc, t_atom* UNUSED(argv))
{
t_demux *x = (t_demux *)pd_new(demux_class);
int i;
- ZEXY_USEVAR(s);
- ZEXY_USEVAR(argv);
if (!argc)argc=2;
x->n_out=argc;
diff --git a/src/drip.c b/src/drip.c
index b8f86fe..855f9d8 100644
--- a/src/drip.c
+++ b/src/drip.c
@@ -108,9 +108,8 @@ static void drip_tick(t_drip *x)
}
}
-static void drip_list(t_drip *x, t_symbol *s, int argc, t_atom *argv)
+static void drip_list(t_drip *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if (x->flush && x->current) { /* do we want to flush */
drip_all(x, x->bufsize - (x->current - x->buffer), x->current);
}
@@ -170,10 +169,9 @@ static void drip_free(t_drip *x)
}
-static void *drip_new(t_symbol *s, int argc, t_atom *argv)
+static void *drip_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_drip *x = (t_drip *)pd_new(drip_class);
- ZEXY_USEVAR(s);
if (argc>1) x->flush = 1;
else x->flush = 0;
diff --git a/src/fifop.c b/src/fifop.c
index cc59569..fe94ffd 100644
--- a/src/fifop.c
+++ b/src/fifop.c
@@ -146,10 +146,9 @@ static t_fifop_prioritylist*getFifo(t_fifop_prioritylist*pfifo)
return pfifo;
}
-static void fifop_list(t_fifop *x, t_symbol *s, int argc, t_atom *argv)
+static void fifop_list(t_fifop *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_fifop_prioritylist*pfifo=0;
- ZEXY_USEVAR(s);
if(!(pfifo=fifop_genprioritylist(x, x->priority))) {
error("[fifop]: couldn't get priority fifo");
return;
diff --git a/src/glue.c b/src/glue.c
index 7eedd4e..6821d3e 100644
--- a/src/glue.c
+++ b/src/glue.c
@@ -32,9 +32,8 @@ typedef struct _zglue
t_int changed;
} t_glue;
-static void glue_lst2(t_glue *x, t_symbol *s, int argc, t_atom *argv)
+static void glue_lst2(t_glue *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
x->changed = 1;
if (x->n2 != argc) {
freebytes(x->ap2, x->n2 * sizeof(t_atom));
@@ -43,9 +42,8 @@ static void glue_lst2(t_glue *x, t_symbol *s, int argc, t_atom *argv)
} else memcpy(x->ap2, argv, argc * sizeof(t_atom));
}
-static void glue_lst(t_glue *x, t_symbol *s, int argc, t_atom *argv)
+static void glue_lst(t_glue *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if (x->n != x->n2+argc) {
freebytes(x->ap, x->n * sizeof(t_atom));
x->n1 = argc;
@@ -85,10 +83,9 @@ static void glue_free(t_glue *x)
freebytes(x->ap2, sizeof(t_atom)*x->n2);
}
-static void *glue_new(t_symbol *s, int argc, t_atom *argv)
+static void *glue_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_glue *x = (t_glue *)pd_new(glue_class);
- ZEXY_USEVAR(s);
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("list"), gensym(""));
outlet_new(&x->x_obj, 0);
diff --git a/src/index.c b/src/index.c
index 2476a9c..405bc19 100644
--- a/src/index.c
+++ b/src/index.c
@@ -171,10 +171,9 @@ static void index_add(t_index *x, t_symbol *s, t_float f)
outlet_float(x->x_obj.ob_outlet, -1.f);
}
/* delete a symbol from the map (if it is in there) */
-static void index_delete(t_index *x, t_symbol *s, int argc, t_atom*argv)
+static void index_delete(t_index *x, t_symbol* UNUSED(s), int argc, t_atom*argv)
{
int idx=-1;
- ZEXY_USEVAR(s);
if(argc!=1){
error("index :: delete what ?");
return;
@@ -288,15 +287,13 @@ static void index_resize(t_index *x, t_float automod)
-static void *index_new(t_symbol *s, int argc, t_atom *argv)
+static void *index_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_index *x = (t_index *)pd_new(index_class);
t_symbol** buf;
int maxentries = 0, automod=0;
- ZEXY_USEVAR(s);
-
if (argc--) {
maxentries = (int)atom_getfloat(argv++);
if (argc) automod = (int)atom_getfloat(argv++);
diff --git a/src/length.c b/src/length.c
index 6a065ce..6863cff 100644
--- a/src/length.c
+++ b/src/length.c
@@ -25,16 +25,12 @@ typedef struct _length
t_object x_obj;
} t_length;
-static void length_list(t_length *x, t_symbol *s, int argc, t_atom *argv)
+static void length_list(t_length *x, t_symbol* UNUSED(s), int argc, t_atom* UNUSED(argv))
{
- ZEXY_USEVAR(s);
- ZEXY_USEVAR(argv);
outlet_float(x->x_obj.ob_outlet, (t_float)argc);
}
-static void length_any(t_length *x, t_symbol *s, int argc, t_atom *argv)
+static void length_any(t_length *x, t_symbol* UNUSED(s), int argc, t_atom* UNUSED(argv))
{
- ZEXY_USEVAR(s);
- ZEXY_USEVAR(argv);
outlet_float(x->x_obj.ob_outlet, (t_float)argc+1);
}
diff --git a/src/lifop.c b/src/lifop.c
index 677a879..69e6c5b 100644
--- a/src/lifop.c
+++ b/src/lifop.c
@@ -131,10 +131,9 @@ static t_lifop_prioritylist*getLifo(t_lifop_prioritylist*plifo)
return plifo;
}
-static void lifop_list(t_lifop *x, t_symbol *s, int argc, t_atom *argv)
+static void lifop_list(t_lifop *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_lifop_prioritylist*plifo=0;
- ZEXY_USEVAR(s);
if(!(plifo=lifop_genprioritylist(x, x->priority))) {
error("[lifop]: couldn't get priority lifo");
return;
diff --git a/src/list2lists.c b/src/list2lists.c
index 02d1040..14d553e 100644
--- a/src/list2lists.c
+++ b/src/list2lists.c
@@ -113,10 +113,9 @@ static void list2lists_free(t_list2lists *x)
}
-static void *list2lists_new(t_symbol *s, int argc, t_atom *argv)
+static void *list2lists_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_list2lists *x = (t_list2lists *)pd_new(list2lists_class);
- ZEXY_USEVAR(s);
outlet_new(&x->x_obj, 0);
x->x_lengin=inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("list"), gensym("lst2"));
diff --git a/src/listfind.c b/src/listfind.c
index 6016b50..22c7af1 100644
--- a/src/listfind.c
+++ b/src/listfind.c
@@ -191,10 +191,9 @@ static void listfind_free(t_listfind *x)
}
-static void *listfind_new(t_symbol *s, int argc, t_atom *argv)
+static void *listfind_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_listfind *x = (t_listfind *)pd_new(listfind_class);
- ZEXY_USEVAR(s);
outlet_new(&x->x_obj, 0);
x->x_listin=inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("list"), gensym("lst2"));
diff --git a/src/liststorage.c b/src/liststorage.c
index 145c3ff..bec5b1f 100644
--- a/src/liststorage.c
+++ b/src/liststorage.c
@@ -79,7 +79,6 @@ static void _liststorage_deletemsglist(t_msglist*list) {
t_msglist*x=list;
while(x) {
t_msglist*y=x;
- int i=0;
x=x->next;
freebytes(y->argv, y->argc*sizeof(t_atom));
diff --git a/src/longload.c b/src/longload.c
index f6844a2..fcdef25 100644
--- a/src/longload.c
+++ b/src/longload.c
@@ -41,6 +41,7 @@ int millisleep(unsigned int milli) {
#else
usleep(milli*1000);
#endif
+ return 0;
}
static void *longload_new(t_float f)
diff --git a/src/lpt.c b/src/lpt.c
index 54969f7..d33c74f 100644
--- a/src/lpt.c
+++ b/src/lpt.c
@@ -283,9 +283,8 @@ static void lpt_free(t_lpt *x)
}
-static void lpt_helper(t_lpt *x)
+static void lpt_helper(t_lpt*UNUSED(x))
{
- ZEXY_USEVAR(x);
post("\n"HEARTSYMBOL" lpt :: direct access to the parallel port");
post("<byte>\t: write byte to the parallel-port");
post("\ncreation:\t\"lpt [<port>]\": connect to parallel port <port> (0..2)");
diff --git a/src/makesymbol.c b/src/makesymbol.c
index 80f0d6e..f0342d8 100644
--- a/src/makesymbol.c
+++ b/src/makesymbol.c
@@ -91,9 +91,8 @@ static t_symbol* list2symbol(char *masque, int argc, t_atom *argv)
return (gensym(buffer));
}
-static void makesymbol_list(t_makesymbol *x, t_symbol *s, int argc, t_atom *argv)
+static void makesymbol_list(t_makesymbol *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
x->x_sym = list2symbol(x->mask, argc, argv);
outlet_symbol(x->x_obj.ob_outlet, x->x_sym);
}
@@ -104,10 +103,9 @@ static void makesymbol_bang(t_makesymbol *x)
}
-static void *makesymbol_new(t_symbol *s, int argc, t_atom *argv)
+static void *makesymbol_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_makesymbol *x = (t_makesymbol *)pd_new(makesymbol_class);
- ZEXY_USEVAR(s);
x->buf = (char *)getbytes(MAXSTRINGLENG * sizeof(char));
@@ -133,9 +131,8 @@ static void makesymbol_free(t_makesymbol *x)
}
-static void makesymbol_helper(t_makesymbol *x)
+static void makesymbol_helper(t_makesymbol* UNUSED(x))
{
- ZEXY_USEVAR(x);
post("\n"HEARTSYMBOL" makesymbol :: create a formatted symbol");
post("<list of anything>\t: glue up to 10 list-elements to 1 formatted symbol\n"
"'bang'\t\t\t: re-output\n"
diff --git a/src/mavg.c b/src/mavg.c
index 9e90d90..75b425b 100644
--- a/src/mavg.c
+++ b/src/mavg.c
@@ -49,12 +49,11 @@ static void mavg_resize(t_mavg *x, t_float f)
while(i--) *dumbuf++ = x->avg;
}
-static void mavg_set(t_mavg *x, t_symbol *s, int argc, t_atom *argv)
+static void mavg_set(t_mavg *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
int i = x->size;
t_float *dummy = x->buf;
t_float f=(argc)?atom_getfloat(argv):x->avg;
- ZEXY_USEVAR(s);
while (i--) *dummy++=f;
diff --git a/src/minmax.c b/src/minmax.c
index ed4f017..8bb003a 100644
--- a/src/minmax.c
+++ b/src/minmax.c
@@ -37,9 +37,8 @@ static void minmax_bang(t_minmax *x)
outlet_float(x->mino,x->min);
}
-static void minmax_list(t_minmax *x, t_symbol *s, int argc, t_atom *argv)
+static void minmax_list(t_minmax *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if(argc){
t_float min = atom_getfloat(argv++);
t_float max=min;
diff --git a/src/multiline~.c b/src/multiline~.c
index 72eaee0..6dc7f0d 100644
--- a/src/multiline~.c
+++ b/src/multiline~.c
@@ -63,9 +63,8 @@ typedef struct _mline {
/* the message thing */
-static void mline_list(t_mline *x, t_symbol *s, int argc, t_atom *argv)
+static void mline_list(t_mline *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
if (argc>x->sigNUM)x->time=atom_getfloat(argv+argc-1);
if (x->time <= 0) {
@@ -199,11 +198,10 @@ static void mline_free(t_mline *x)
}
-static void *mline_new(t_symbol *s, int argc, t_atom *argv)
+static void *mline_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_mline *x = (t_mline *)pd_new(mline_class);
int i;
- ZEXY_USEVAR(s);
if (!argc) {
argc = 1;
diff --git a/src/multiplex~.c b/src/multiplex~.c
index 5a75c35..82d76d5 100644
--- a/src/multiplex~.c
+++ b/src/multiplex~.c
@@ -75,13 +75,10 @@ static void mux_tilde_free(t_mux *x)
freebytes(x->in, x->n_in * sizeof(t_sample *));
}
-static void *mux_tilde_new(t_symbol *s, int argc, t_atom *argv)
+static void *mux_tilde_new(t_symbol* UNUSED(s), int argc, t_atom* UNUSED(argv))
{
t_mux *x = (t_mux *)pd_new(mux_tilde_class);
int i;
- ZEXY_USEVAR(s);
- ZEXY_USEVAR(argv);
-
if (!argc)argc=2;
x->n_in=argc;
x->input=0;
diff --git a/src/quantize~.c b/src/quantize~.c
index 2ba6451..b561243 100644
--- a/src/quantize~.c
+++ b/src/quantize~.c
@@ -75,9 +75,8 @@ static void quantize_dsp(t_quantize *x, t_signal **sp)
dsp_add(quantize_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
}
-static void quantize_tilde_helper(t_quantize *x)
+static void quantize_tilde_helper(t_quantize* UNUSED(x))
{
- ZEXY_USEVAR(x);
post(""HEARTSYMBOL" quantize~-object\t:: used for quantizing signals by various degrees");
post("<quants> : quantize a signal into <quants> steps ('0' turns quantizing off)\n"
"'8bit' : quantize to 8 bit\n"
diff --git a/src/relay.c b/src/relay.c
index 0383cfd..a104b94 100644
--- a/src/relay.c
+++ b/src/relay.c
@@ -146,13 +146,12 @@ static void relay_free(t_relay *x)
freebytes(x->x_vec, x->x_nelement * sizeof(*x->x_vec));
}
-static void *relay_new(t_symbol *s, int argc, t_atom *argv)
+static void *relay_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
int n;
t_relayelement *e;
t_relay *x = (t_relay *)pd_new(relay_class);
t_atom a;
- ZEXY_USEVAR(s);
if (argc == 0)
{
argc = 1;
diff --git a/src/repack.c b/src/repack.c
index 1d15863..044d369 100644
--- a/src/repack.c
+++ b/src/repack.c
@@ -106,11 +106,10 @@ static void repack_pointer(t_repack *x, t_gpointer *p)
x->current++;
if (x->current >= x->outputsize) repack_bang(x);
}
-static void repack_list(t_repack *x, t_symbol *s, int argc, t_atom *argv)
+static void repack_list(t_repack *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
int remain = x->outputsize - x->current;
t_atom *ap = argv;
- ZEXY_USEVAR(s);
if (argc >= remain) {
memcpy(x->buffer+x->current, ap, remain * sizeof(t_atom));
diff --git a/src/repeat.c b/src/repeat.c
index 31fbc50..de9e719 100644
--- a/src/repeat.c
+++ b/src/repeat.c
@@ -37,10 +37,9 @@ static void repeat_anything(t_repeat *x, t_symbol *s, int argc, t_atom *argv)
while(i--)outlet_anything(x->x_obj.ob_outlet, s, argc, argv);
}
-static void *repeat_new(t_symbol*s, int argc, t_atom*argv)
+static void *repeat_new(t_symbol* UNUSED(s), int argc, t_atom*argv)
{
t_repeat *x = (t_repeat *)pd_new(repeat_class);
- ZEXY_USEVAR(s);
if(argc){
if(A_FLOAT==argv->a_type)
x->fcount = atom_getfloat(argv);
diff --git a/src/sfplay.c b/src/sfplay.c
index 2492f60..b5db0b3 100644
--- a/src/sfplay.c
+++ b/src/sfplay.c
@@ -136,9 +136,8 @@ static int sfplay_am_i_big_endian(void)
}
-static void sfplay_helper(t_sfplay *x)
+static void sfplay_helper(t_sfplay* UNUSED(x))
{
- ZEXY_USEVAR(x);
post("\nsfplay :: a soundfile-player (c) winfried ritsch 1999");
post("\ncreation :: sfplay <channels> <bytes> : channels set the number of channels, bytes skip fileheader");
post("\nopen [<path>]<filename> [<endianity>]\t::open b(ig) or l(ittle) endian file"
diff --git a/src/strcmp.c b/src/strcmp.c
index 6fb898f..bf5a4dc 100644
--- a/src/strcmp.c
+++ b/src/strcmp.c
@@ -79,9 +79,8 @@ static void list2binbuf(t_binbuf**bbuf, int *n, char**str, int argc, t_atom*argv
if(' '==s[i])s[i]=0;
}
-static void strcmp_list(t_strcmp *x, t_symbol *s, int argc, t_atom *argv)
+static void strcmp_list(t_strcmp *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
list2binbuf(&x->bbuf1, &x->n1, &x->str1, argc, argv);
strcmp_bang(x);
}
@@ -93,9 +92,8 @@ static void strcmp_symbol(t_strcmp *x, t_symbol *s)
strcmp_bang(x);
}
-static void strcmp_secondlist(t_strcmp *x, t_symbol *s, int argc, t_atom *argv)
+static void strcmp_secondlist(t_strcmp *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
- ZEXY_USEVAR(s);
list2binbuf(&x->bbuf2, &x->n2, &x->str2, argc, argv);
}
static void strcmp_secondsymbol(t_strcmp *x, t_symbol *s)
@@ -114,10 +112,9 @@ static void strcmp_proxy_symbol(t_strcmp_proxy *y, t_symbol *s)
if(s)strcmp_secondsymbol(y->p_master, s);
}
-static void *strcmp_new(t_symbol *s, int argc, t_atom *argv)
+static void *strcmp_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_strcmp *x = (t_strcmp *)pd_new(strcmp_class);
- ZEXY_USEVAR(s);
x->x_proxy=(t_strcmp_proxy*)pd_new(strcmp_proxy_class);
x->x_proxy->p_master = x;
diff --git a/src/sum.c b/src/sum.c
index a293d31..606e082 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -26,10 +26,9 @@ typedef struct _sum
t_object x_obj;
} t_sum;
-static void sum_list(t_sum *x, t_symbol *s, int argc, t_atom *argv)
+static void sum_list(t_sum *x, t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_float sum = 0.f;
- ZEXY_USEVAR(s);
while(argc--)sum+=atom_getfloat(argv++);
diff --git a/src/symbol2list.c b/src/symbol2list.c
index 27c4c2a..5d7e74a 100644
--- a/src/symbol2list.c
+++ b/src/symbol2list.c
@@ -132,10 +132,9 @@ static void symbol2list_symbol(t_symbol2list *x, t_symbol *s){
x->s = s;
symbol2list_bang(x);
}
-static void *symbol2list_new(t_symbol *s, int argc, t_atom *argv)
+static void *symbol2list_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_symbol2list *x = (t_symbol2list *)pd_new(symbol2list_class);
- ZEXY_USEVAR(s);
outlet_new(&x->x_obj, 0);
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("symbol"), gensym(""));
diff --git a/src/tabdump.c b/src/tabdump.c
index 9dcad66..ad1b86f 100644
--- a/src/tabdump.c
+++ b/src/tabdump.c
@@ -58,10 +58,9 @@ static void tabdump_bang(t_tabdump *x)
}
}
-static void tabdump_list(t_tabdump *x, t_symbol*s,int argc, t_atom*argv)
+static void tabdump_list(t_tabdump *x, t_symbol* UNUSED(s),int argc, t_atom*argv)
{
int a,b;
- ZEXY_USEVAR(s);
switch(argc){
case 2:
a=atom_getint(argv);
diff --git a/src/tabminmax.c b/src/tabminmax.c
index 8a116a1..8353ae3 100644
--- a/src/tabminmax.c
+++ b/src/tabminmax.c
@@ -83,10 +83,9 @@ static void tabminmax_bang(t_tabminmax *x)
}
}
-static void tabminmax_list(t_tabminmax *x, t_symbol*s,int argc, t_atom*argv)
+static void tabminmax_list(t_tabminmax *x, t_symbol* UNUSED(s),int argc, t_atom*argv)
{
int a,b;
- ZEXY_USEVAR(s);
switch(argc){
case 2:
a=atom_getint(argv);
diff --git a/src/tabset.c b/src/tabset.c
index 9c11633..f7b0eec 100644
--- a/src/tabset.c
+++ b/src/tabset.c
@@ -51,12 +51,11 @@ static void tabset_float(t_tabset *x, t_floatarg f)
}
}
-static void tabset_list(t_tabset *x, t_symbol *s, int argc, t_atom* argv)
+static void tabset_list(t_tabset *x, t_symbol* UNUSED(s), int argc, t_atom* argv)
{
t_garray *A;
int npoints;
zarray_t *vec;
- ZEXY_USEVAR(s);
if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class)))
error("%s: no such array", x->x_arrayname->s_name);
diff --git a/src/time.c b/src/time.c
index 02ba814..9db6195 100644
--- a/src/time.c
+++ b/src/time.c
@@ -57,11 +57,10 @@ typedef struct _time
t_outlet *x_outlet4;
} t_time;
-static void *time_new(t_symbol *s, int argc, t_atom *argv)
+static void *time_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_time *x = (t_time *)pd_new(time_class);
char buf[5];
- ZEXY_USEVAR(s);
x->GMT=0;
if (argc) {
@@ -99,9 +98,8 @@ static void time_bang(t_time *x)
outlet_float(x->x_outlet1, (t_float)resolvetime->tm_hour);
}
-static void help_time(t_time *x)
+static void help_time(t_time* UNUSED(x))
{
- ZEXY_USEVAR(x);
post("\n"HEARTSYMBOL" time\t\t:: get the current system time");
post("\noutputs are\t: hour / minute / sec / msec");
post("\ncreation\t:: 'time [GMT]': show local time or GMT");
diff --git a/src/urn.c b/src/urn.c
index ee45378..602fd13 100644
--- a/src/urn.c
+++ b/src/urn.c
@@ -104,11 +104,10 @@ static void urn_seed(t_urn *x, t_float f)
x->x_seed = f;
}
-static void *urn_new(t_symbol *s, int argc, t_atom *argv)
+static void *urn_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_urn *x = (t_urn *)pd_new(urn_class);
t_float f=0.;
- ZEXY_USEVAR(s);
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym(""));
x->x_floatout=outlet_new(&x->x_obj, gensym("float"));
diff --git a/src/wrap.c b/src/wrap.c
index 83e28cc..1ecc7c1 100644
--- a/src/wrap.c
+++ b/src/wrap.c
@@ -37,9 +37,8 @@ static void wrap_float(t_wrap *x, t_float f)
outlet_float(x->x_obj.ob_outlet, x->f_lower+modulo);
}
}
-static void wrap_set(t_wrap *x, t_symbol *s, int argc, t_atom *argv){
+static void wrap_set(t_wrap *x, t_symbol* UNUSED(s), int argc, t_atom *argv){
t_float f1, f2;
- ZEXY_USEVAR(s);
switch (argc){
case 0:
f1=0.0;
diff --git a/src/zexy.h b/src/zexy.h
index b3b8c72..42541a9 100644
--- a/src/zexy.h
+++ b/src/zexy.h
@@ -100,7 +100,14 @@
# endif /* OSX-10.3 */
#endif /* APPLE */
-#define ZEXY_USEVAR(x) x=x
+
+#ifdef __GNUC__
+# define UNUSED(x) ZUNUSED_ ## x __attribute__((__unused__))
+# define UNUSED_FUNCTION(x) __attribute__((__unused__)) ZUNUSEDFUN_ ## x
+#else
+# define UNUSED(x) ZUNUSED_ ## x
+# define UNUSED_FUNCTION(x) ZUNUSEDFUN_ ## x
+#endif
#define ZEXY_TYPE_EQUAL(type1, type2) (sizeof(type1) == sizeof(type2))