From cfed7d1ee29299c9d25658c6fb155ffb13c757d4 Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Tue, 26 Nov 2002 12:35:23 +0000 Subject: warning reduction svn path=/trunk/externals/ggee/; revision=255 --- control/shell.c | 7 ++++-- filters/moog~.c | 68 ++++++++++++++++++++++++++++----------------------------- gui/button.c | 10 ++++++--- gui/image.c | 2 +- gui/w_envgen.h | 5 +++-- 5 files changed, 50 insertions(+), 42 deletions(-) diff --git a/control/shell.c b/control/shell.c index 79d536b..cb31f84 100755 --- a/control/shell.c +++ b/control/shell.c @@ -8,11 +8,14 @@ #endif #include +#include #include #include #include #include +void sys_rmpollfn(int fd); + /* ------------------------ shell ----------------------------- */ #define INBUFSIZE 1024 @@ -177,7 +180,7 @@ static void shell_send(t_shell *x, t_symbol *s,int ac, t_atom *at) } tmp[size-1] = '\0'; post("sending %s",tmp); - fprintf(x->fdinpipe[0],tmp); + write(x->fdinpipe[0],tmp,strlen(tmp)); } static void shell_anything(t_shell *x, t_symbol *s, int ac, t_atom *at) @@ -244,7 +247,7 @@ void shell_free(t_shell* x) binbuf_free(x->x_binbuf); } -static void *shell_new() +static void *shell_new(void) { t_shell *x = (t_shell *)pd_new(shell_class); diff --git a/filters/moog~.c b/filters/moog~.c index 924ff31..8f4dbea 100755 --- a/filters/moog~.c +++ b/filters/moog~.c @@ -66,10 +66,10 @@ t_int *moog_perform(t_int *w) float x2 = x->x_2; float x3 = x->x_3; float x4 = x->x_4; - float y1 = x->y_1; - float y2 = x->y_2; - float y3 = x->y_3; - float y4 = x->y_4; + float ys1 = x->y_1; + float ys2 = x->y_2; + float ys3 = x->y_3; + float ys4 = x->y_4; while (n--) { @@ -77,23 +77,23 @@ t_int *moog_perform(t_int *w) *k = calc_k(*p,*k); pt =*p; pt1=(pt+1)*0.76923077; - in = *in1++ - *k*y4; - y1 = (pt1)*in + 0.3*x1 - pt*y1; + in = *in1++ - *k*ys4; + ys1 = (pt1)*in + 0.3*x1 - pt*ys1; x1 = in; - y2 = (pt1)*y1 + 0.3*x2 - pt*y2; - x2 = y1; - y3 = (pt1)*y2 + 0.3 *x3 - pt*y3; - x3 = y2; - y4 = (pt1)*y3 + 0.3*x4 - pt*y4; - x4 = y3; - *out++ = y4; + ys2 = (pt1)*ys1 + 0.3*x2 - pt*ys2; + x2 = ys1; + ys3 = (pt1)*ys2 + 0.3 *x3 - pt*ys3; + x3 = ys2; + ys4 = (pt1)*ys3 + 0.3*x4 - pt*ys4; + x4 = ys3; + *out++ = ys4; } - x->y_1 = y1; - x->y_2 = y2; - x->y_3 = y3; - x->y_4 = y4; + x->y_1 = ys1; + x->y_2 = ys2; + x->y_3 = ys3; + x->y_4 = ys4; x->x_1 = x1; x->x_2 = x2; x->x_3 = x3; @@ -118,10 +118,10 @@ t_int *moog_perf8(t_int *w) t_float x2 = x->x_2; t_float x3 = x->x_3; t_float x4 = x->x_4; - t_float y1 = x->y_1; - t_float y2 = x->y_2; - t_float y3 = x->y_3; - t_float y4 = x->y_4; + t_float ys1 = x->y_1; + t_float ys2 = x->y_2; + t_float ys3 = x->y_3; + t_float ys4 = x->y_4; t_float temp,temp2; t_float pt,pt1; t_float in; @@ -132,24 +132,24 @@ t_int *moog_perf8(t_int *w) pt =*p* 0.01*0.0140845 - 0.9999999f; pt1=(pt+1.0)*0.76923077; - in = *in1++ - *k*y4; - y1 = pt1*(in + 0.3*x1) - pt*y1; + in = *in1++ - *k*ys4; + ys1 = pt1*(in + 0.3*x1) - pt*ys1; x1 = in; - y2 = pt1*(y1 + 0.3*x2) - pt*y2; - x2 = y1; - y3 = pt1*(y2 + 0.3*x3) - pt*y3; - x3 = y2; - y4 = pt1*(y3 + 0.3*x4) - pt*y4; - x4 = y3; - *out++ = y4; + ys2 = pt1*(ys1 + 0.3*x2) - pt*ys2; + x2 = ys1; + ys3 = pt1*(ys2 + 0.3*x3) - pt*ys3; + x3 = ys2; + ys4 = pt1*(ys3 + 0.3*x4) - pt*ys4; + x4 = ys3; + *out++ = ys4; p++;k++; } - x->y_1 = y1; - x->y_2 = y2; - x->y_3 = y3; - x->y_4 = y4; + x->y_1 = ys1; + x->y_2 = ys2; + x->y_3 = ys3; + x->y_4 = ys4; x->x_1 = x1; x->x_2 = x2; x->x_3 = x3; diff --git a/gui/button.c b/gui/button.c index 362312d..3360464 100644 --- a/gui/button.c +++ b/gui/button.c @@ -1,7 +1,11 @@ #include -#include "g_canvas.h" +#include +#include +#include +t_rtext *rtext_new_without_senditup(t_glist *glist, t_text *who, t_rtext *next); + #ifdef NT #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) @@ -320,7 +324,7 @@ static void *button_new(t_symbol* text) /* TODO .. ask the button for its width */ x->x_width += strlen(x->x_text->s_name)*5.7; - sprintf(buf,"button%x",x); + sprintf(buf,"button%p",x); x->x_sym = gensym(buf); pd_bind(&x->x_obj.ob_pd, x->x_sym); @@ -334,7 +338,7 @@ static void *button_new(t_symbol* text) return (x); } -void button_setup() { +void button_setup(void) { post("button setup"); button_class = class_new(gensym("button"), (t_newmethod)button_new, 0, sizeof(t_button),0,A_DEFSYM,0); diff --git a/gui/image.c b/gui/image.c index ad4635e..7d57744 100644 --- a/gui/image.c +++ b/gui/image.c @@ -159,7 +159,7 @@ void image_color(t_image* x,t_symbol* col) */ } -static void image_setwidget() +static void image_setwidget(void) { image_widgetbehavior.w_getrectfn = image_getrect; image_widgetbehavior.w_displacefn = image_displace; diff --git a/gui/w_envgen.h b/gui/w_envgen.h index 88c0c6b..7b89939 100755 --- a/gui/w_envgen.h +++ b/gui/w_envgen.h @@ -212,7 +212,7 @@ int i; xscale = x->w.width/x->duration[x->last_state]; yscale = x->w.height; - sprintf(buf,".x%x.c coords %xP",(unsigned int)glist_getcanvas(glist),x); + sprintf(buf,".x%x.c coords %pP",(unsigned int)glist_getcanvas(glist),x); xpos = x->x_obj.te_xpix; ypos = (int) (x->x_obj.te_ypix + x->w.height); for (i=0;i<=x->last_state;i++) { @@ -403,7 +403,8 @@ void envgen_click(t_envgen *x, x->w.grabbed = envgen_next_doodle(x,xpos,ypos); #if (PD_VERSION_MINOR > 31) - glist_grab(x->w.glist, &x->x_obj.te_g, envgen_motion, envgen_key, xpos, ypos); + glist_grab(x->w.glist, &x->x_obj.te_g, (t_glistmotionfn) envgen_motion, + (t_glistkeyfn) envgen_key, xpos, ypos); #else glist_grab(x->w.glist, &x->x_obj.te_g, xpos, ypos); #endif -- cgit v1.2.1