From 51b379a0186e4048d4fe09d43c610d41bbfaa458 Mon Sep 17 00:00:00 2001 From: Bryan Jurish Date: Thu, 4 Dec 2008 14:47:46 +0000 Subject: + added 'unused' attributes to gfsm externals code + updated extended/Makefile: don't call ./autogen.sh for gfsm stuff svn path=/trunk/externals/moocow/; revision=10423 --- extended/Makefile | 10 +++++----- gfsm/src/atom_alphabet.c | 2 +- gfsm/src/pd_alphabet.c | 8 ++++---- gfsm/src/pd_automaton.c | 34 +++++++++++++++++----------------- gfsm/src/pd_automaton.h | 1 + gfsm/src/pd_gfsm.c | 2 +- gfsm/src/pd_state.c | 2 +- 7 files changed, 30 insertions(+), 29 deletions(-) diff --git a/extended/Makefile b/extended/Makefile index 4553533..2cd7b4a 100644 --- a/extended/Makefile +++ b/extended/Makefile @@ -24,7 +24,7 @@ SUBDIRS = \ MOOCOW_DIR ?=$(shell pwd) MOOCOW_BUILD ?=$(MOOCOW_DIR)/build.moo MOOCOW_MFLAGS ?=DESTDIR="" -MOOCOW_BUILD_VERSION ?=0.02 +MOOCOW_BUILD_VERSION ?=0.03 CONFIGURE_ARGS=\ CFLAGS="$(CFLAGS)" \ @@ -41,7 +41,7 @@ pd_src ?= $(CURDIR)/../../../pd ##====================================================================== ## Rules: default -all: config build.stamp +all: build.stamp ##====================================================================== ## Rules: subdirectory: dummy @@ -111,7 +111,7 @@ GFSM_DIR ?=../gfsm #GFSM_CONFIGURE_ARGS ?= gfsm.autogen_stamp: - (cd $(GFSM_DIR); sh ./autogen.sh) || true +# (cd $(GFSM_DIR); sh ./autogen.sh) || true touch $@ gfsm.configure_stamp: gfsm.autogen_stamp @@ -287,9 +287,9 @@ autogen: $(SUBDIRS:=.autogen_stamp) configure: $(SUBDIRS:=.configure_stamp) config: - @echo "MOOCOW_BUILD_VERSION=$(MOOCOW_BUILD_VERSION)" + @echo "(moocow:debug) MOOCOW_BUILD_VERSION=$(MOOCOW_BUILD_VERSION)" -build.stamp: $(SUBDIRS:=.build_stamp) +build.stamp: config $(SUBDIRS:=.build_stamp) rm -rf $(MOOCOW_BUILD)/noinstall touch $@ diff --git a/gfsm/src/atom_alphabet.c b/gfsm/src/atom_alphabet.c index 16f4bdd..64e1be8 100644 --- a/gfsm/src/atom_alphabet.c +++ b/gfsm/src/atom_alphabet.c @@ -78,7 +78,7 @@ gboolean gfsm_pd_atom_equal(t_atom *a1, t_atom *a2) /*-------------------------------------------------------------- * dup() */ -t_atom *gfsm_pd_atom_dup(gfsmPdAtomAlphabet *alph, t_atom *a) +t_atom *gfsm_pd_atom_dup(GFSM_UNUSED gfsmPdAtomAlphabet *alph, t_atom *a) { //return (a ? copybytes(a, sizeof(t_atom)) : NULL); return (a ? gfsm_mem_dup_n(a,sizeof(t_atom)) : NULL); diff --git a/gfsm/src/pd_alphabet.c b/gfsm/src/pd_alphabet.c index 480a74a..0fb86f0 100644 --- a/gfsm/src/pd_alphabet.c +++ b/gfsm/src/pd_alphabet.c @@ -280,7 +280,7 @@ static void pd_gfsm_alphabet_obj_outlet_pair(t_pd_gfsm_alphabet_obj *x, t_float /*-------------------------------------------------------------------- * pd_gfsm_alphabet_obj: insert */ -static void pd_gfsm_alphabet_obj_insert(t_pd_gfsm_alphabet_obj *x, t_symbol *s, int argc, t_atom *argv) +static void pd_gfsm_alphabet_obj_insert(t_pd_gfsm_alphabet_obj *x, GFSM_UNUSED t_symbol *s, int argc, t_atom *argv) { if (argc < 1) { error("pd_gfsm_alphabet_obj_insert(): no atom to insert?"); @@ -294,7 +294,7 @@ static void pd_gfsm_alphabet_obj_insert(t_pd_gfsm_alphabet_obj *x, t_symbol *s, /*-------------------------------------------------------------------- * pd_gfsm_alphabet_obj: atom2label */ -static void pd_gfsm_alphabet_obj_atom2label(t_pd_gfsm_alphabet_obj *x, t_symbol *s, int argc, t_atom *argv) +static void pd_gfsm_alphabet_obj_atom2label(t_pd_gfsm_alphabet_obj *x, GFSM_UNUSED t_symbol *s, int argc, t_atom *argv) { if (argc < 1) { error("pd_gfsm_alphabet_obj_atom2label(): no arguments?"); @@ -308,7 +308,7 @@ static void pd_gfsm_alphabet_obj_atom2label(t_pd_gfsm_alphabet_obj *x, t_symbol /*-------------------------------------------------------------------- * pd_gfsm_alphabet_obj: atom2label_force */ -static void pd_gfsm_alphabet_obj_atom2label_force(t_pd_gfsm_alphabet_obj *x, t_symbol *s, int argc, t_atom *argv) +static void pd_gfsm_alphabet_obj_atom2label_force(t_pd_gfsm_alphabet_obj *x, GFSM_UNUSED t_symbol *s, int argc, t_atom *argv) { if (argc < 1) { error("pd_gfsm_alphabet_obj_atom2label_force(): no arguments?"); @@ -351,7 +351,7 @@ static void pd_gfsm_alphabet_obj_label2atom_force(t_pd_gfsm_alphabet_obj *x, t_f /*-------------------------------------------------------------------- * pd_gfsm_alphabet_obj: rmatom() */ -static void pd_gfsm_alphabet_obj_rmatom(t_pd_gfsm_alphabet_obj *x, t_symbol *sel, int argc, t_atom *argv) +static void pd_gfsm_alphabet_obj_rmatom(t_pd_gfsm_alphabet_obj *x, GFSM_UNUSED t_symbol *sel, int argc, t_atom *argv) { if (argc < 1) return; gfsm_alphabet_remove_key(x->x_alphabet_pd->x_alphabet, argv); diff --git a/gfsm/src/pd_automaton.c b/gfsm/src/pd_automaton.c index bfcd7e9..bcd12ec 100644 --- a/gfsm/src/pd_automaton.c +++ b/gfsm/src/pd_automaton.c @@ -197,12 +197,12 @@ void pd_gfsm_automaton_obj_outlet_labels(t_pd_gfsm_automaton_obj *x, t_symbol *s if (labs->len > 0) { int i; - if (x->x_argc < labs->len) { + if (x->x_argc < (int)labs->len) { size_t newsize = labs->len * sizeof(t_atom); x->x_argv = resizebytes(x->x_argv, x->x_argc*sizeof(t_atom), newsize); x->x_argc = labs->len; } - for (i=0; i < labs->len; i++) { + for (i=0; i < (int)labs->len; i++) { SETFLOAT(x->x_argv+i, (gfsmLabelVal)g_ptr_array_index(labs,i)); } outlet_anything(x->x_valout, sel, labs->len, x->x_argv); @@ -608,7 +608,7 @@ static void pd_gfsm_automaton_obj_info(t_pd_gfsm_automaton_obj *x) /*-------------------------------------------------------------------- * automaton_obj: draw_dot() */ -static void pd_gfsm_automaton_obj_draw_dot(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) +static void pd_gfsm_automaton_obj_draw_dot(t_pd_gfsm_automaton_obj *x, GFSM_UNUSED GIMME_ARGS) { t_pd_gfsm_alphabet_pd *ialph=NULL, *oalph=NULL, *salph=NULL; t_symbol @@ -714,13 +714,13 @@ static void pd_gfsm_automaton_obj_lookup(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) //-- ensure labels exists, is cleared, & is sufficiently allocated if (!x->x_labels) { x->x_labels = g_ptr_array_sized_new(argc-1); - } else if (argc > x->x_labels->len) { + } else if (argc > (int)x->x_labels->len) { g_ptr_array_set_size(x->x_labels, argc); } x->x_labels->len = 0; //-- get labels - for (i=1; i < argc; i++) { + for (i=1; (int)i < argc; i++) { gfsmLabelVal lab = atom_getfloat(argv+i); //if (lab==gfsmEpsilon) continue; //-- ignore epsilons (?) g_ptr_array_add(x->x_labels, (gpointer)lab); @@ -752,7 +752,7 @@ static void pd_gfsm_automaton_obj_lookup(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) /*-------------------------------------------------------------------- * paths_unsafe() */ -static void pd_gfsm_automaton_obj_paths_unsafe(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) +static void pd_gfsm_automaton_obj_paths_unsafe(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV) { //-- clear set first if (x->x_paths_s) gfsm_set_clear(x->x_paths_s); @@ -778,7 +778,7 @@ static void pd_gfsm_automaton_obj_paths_unsafe(t_pd_gfsm_automaton_obj *x, GIMME /*-------------------------------------------------------------------- * paths_safe() */ -static void pd_gfsm_automaton_obj_paths_safe(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) +static void pd_gfsm_automaton_obj_paths_safe(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV) { gfsmAutomaton *fsm = x->x_automaton_pd->x_automaton; @@ -795,7 +795,7 @@ static void pd_gfsm_automaton_obj_paths_safe(t_pd_gfsm_automaton_obj *x, GIMME_A /*-------------------------------------------------------------------- * path_first() */ -static void pd_gfsm_automaton_obj_path_first(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) +static void pd_gfsm_automaton_obj_path_first(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV) { x->x_paths_i = 0; if (x->x_paths_a && x->x_paths_i < x->x_paths_a->len) { @@ -808,9 +808,9 @@ static void pd_gfsm_automaton_obj_path_first(t_pd_gfsm_automaton_obj *x, GIMME_A /*-------------------------------------------------------------------- * path_next() */ -static void pd_gfsm_automaton_obj_path_next(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) +static void pd_gfsm_automaton_obj_path_next(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV) { - if (x->x_paths_a && x->x_paths_i >= 0 && x->x_paths_i+1 < x->x_paths_a->len) { + if (x->x_paths_a && x->x_paths_i+1 < x->x_paths_a->len) { /*&& x->x_paths_i >= 0 : always true*/ x->x_paths_i++; pd_gfsm_automaton_obj_outlet_float(x, sel, x->x_paths_i); } else { @@ -824,7 +824,7 @@ static void pd_gfsm_automaton_obj_path_next(t_pd_gfsm_automaton_obj *x, GIMME_AR static void pd_gfsm_automaton_obj_path_nth(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) { int ni = argc > 0 ? atom_getfloat(argv) : 0; - if (x->x_paths_a && ni >= 0 && ni < x->x_paths_a->len) { + if (x->x_paths_a && ni >= 0 && (guint)ni < x->x_paths_a->len) { x->x_paths_i = ni; pd_gfsm_automaton_obj_outlet_float(x, sel, x->x_paths_i); } else { @@ -835,9 +835,9 @@ static void pd_gfsm_automaton_obj_path_nth(t_pd_gfsm_automaton_obj *x, GIMME_ARG /*-------------------------------------------------------------------- * path_lo() */ -static void pd_gfsm_automaton_obj_path_lo(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) +static void pd_gfsm_automaton_obj_path_lo(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV) { - if (x->x_paths_a && x->x_paths_i >= 0 && x->x_paths_i < x->x_paths_a->len) { + if (x->x_paths_a && x->x_paths_i < x->x_paths_a->len) { /*&& x->x_paths_i >= 0*/ gfsmPath *p = (gfsmPath*)g_ptr_array_index(x->x_paths_a,x->x_paths_i); pd_gfsm_automaton_obj_outlet_labels(x, sel, p->lo); } @@ -849,9 +849,9 @@ static void pd_gfsm_automaton_obj_path_lo(t_pd_gfsm_automaton_obj *x, GIMME_ARGS /*-------------------------------------------------------------------- * path_hi() */ -static void pd_gfsm_automaton_obj_path_hi(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) +static void pd_gfsm_automaton_obj_path_hi(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV) { - if (x->x_paths_a && x->x_paths_i >= 0 && x->x_paths_i < x->x_paths_a->len) { + if (x->x_paths_a && x->x_paths_i < x->x_paths_a->len) { /*&& x->x_paths_i >= 0*/ gfsmPath *p = (gfsmPath*)g_ptr_array_index(x->x_paths_a,x->x_paths_i); pd_gfsm_automaton_obj_outlet_labels(x, sel, p->hi); } @@ -863,9 +863,9 @@ static void pd_gfsm_automaton_obj_path_hi(t_pd_gfsm_automaton_obj *x, GIMME_ARGS /*-------------------------------------------------------------------- * path_w() */ -static void pd_gfsm_automaton_obj_path_w(t_pd_gfsm_automaton_obj *x, GIMME_ARGS) +static void pd_gfsm_automaton_obj_path_w(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV) { - if (x->x_paths_a && x->x_paths_i >= 0 && x->x_paths_i < x->x_paths_a->len) { + if (x->x_paths_a && x->x_paths_i < x->x_paths_a->len) { /*&& x->x_paths_i >= 0*/ gfsmPath *p = (gfsmPath*)g_ptr_array_index(x->x_paths_a,x->x_paths_i); pd_gfsm_automaton_obj_outlet_float(x, sel, p->w); } diff --git a/gfsm/src/pd_automaton.h b/gfsm/src/pd_automaton.h index fcc2646..550cca4 100644 --- a/gfsm/src/pd_automaton.h +++ b/gfsm/src/pd_automaton.h @@ -75,6 +75,7 @@ typedef struct _pd_gfsm_automaton_obj */ #define atom_getboolarg(which,argc,argv) (atom_getintarg(which,argc,argv)==0 ? FALSE : TRUE) #define GIMME_ARGS t_symbol *sel, int argc, t_atom *argv +#define GIMME_ARGS_NOCV t_symbol *sel, GFSM_UNUSED int argc, GFSM_UNUSED t_atom *argv /*---------------------------------------------------------------------- * utilities diff --git a/gfsm/src/pd_gfsm.c b/gfsm/src/pd_gfsm.c index e74acec..848cfcf 100644 --- a/gfsm/src/pd_gfsm.c +++ b/gfsm/src/pd_gfsm.c @@ -61,7 +61,7 @@ static void *pd_gfsm_dummy_new(void) /*-------------------------------------------------------------------- * pd_gfsm_dummy: free() */ -static void pd_gfsm_dummy_free(t_pd_gfsm_dummy *x) +static void pd_gfsm_dummy_free(GFSM_UNUSED t_pd_gfsm_dummy *x) {} /*-------------------------------------------------------------------- diff --git a/gfsm/src/pd_state.c b/gfsm/src/pd_state.c index 621979d..16f0d5f 100644 --- a/gfsm/src/pd_state.c +++ b/gfsm/src/pd_state.c @@ -48,7 +48,7 @@ static t_class *pd_gfsm_state_class; /*-------------------------------------------------------------------- * new() */ -static void *pd_gfsm_state_new(t_symbol *sel, int argc, t_atom *argv) +static void *pd_gfsm_state_new(GFSM_UNUSED t_symbol *sel, int argc, t_atom *argv) { t_symbol *name = &s_; t_pd_gfsm_state *x = (t_pd_gfsm_state *)pd_new(pd_gfsm_state_class); -- cgit v1.2.1