Commit 5f1ee8fe authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

remove unused variables, use correct types as args, protect against overflow

parent 73fb5622
......@@ -398,7 +398,7 @@ void mayer_ifft(int n, REAL *real, REAL *imag)
void mayer_realfft(int n, REAL *real)
{
REAL a,b,c,d;
REAL a,b;
int i,j,k;
mayer_fht(real,n);
for (i=1,j=n-1,k=n/2;i<k;i++,j--) {
......@@ -411,7 +411,7 @@ void mayer_realfft(int n, REAL *real)
void mayer_realifft(int n, REAL *real)
{
REAL a,b,c,d;
REAL a,b;
int i,j,k;
for (i=1,j=n-1,k=n/2;i<k;i++,j--) {
a = real[i];
......
......@@ -48,7 +48,7 @@ typedef struct _scalehandle
t_symbol *h_bindsym;
int h_scale;
char h_pathname[37]; // max size for ".x%llx.h%llx" = 5+4*sizeof(long)
char h_outlinetag[18]; // max size for "h%llx" = 2+2*sizeof(long)
char h_outlinetag[25]; // "h%zux", (t_uint)h
int h_dragon; // bool
int h_dragx;
int h_dragy;
......
......@@ -132,7 +132,7 @@ static void bng__motionhook(t_scalehandle *sh,
{
if (mouse_y > y2)
d = mouse_y - y2;
else if (abs(mouse_y - y2) < abs(mouse_x - x2))
else if (abs((int)(mouse_y - y2)) < abs((int)(mouse_x - x2)))
d = mouse_y - y2;
else
d = mouse_x - x2;
......
......@@ -552,6 +552,7 @@ void canvas_writescalar(t_symbol *templatesym, t_word *w, t_binbuf *b,
}
}
/*
static void glist_writelist(t_gobj *y, t_binbuf *b)
{
for (; y; y = y->g_next)
......@@ -563,6 +564,7 @@ static void glist_writelist(t_gobj *y, t_binbuf *b)
}
}
}
*/
/* ------------ routines to write out templates for data ------- */
......@@ -637,6 +639,7 @@ static void canvas_addtemplatesforstruct(t_template *template,
}
}
/*
static void canvas_addtemplatesforlist(t_gobj *y,
int *p_ntemplates, t_symbol ***p_templatevec)
{
......@@ -649,6 +652,7 @@ static void canvas_addtemplatesforlist(t_gobj *y,
}
}
}
*/
/* write all "scalars" in a glist to a binbuf. */
t_binbuf *glist_writetobinbuf(t_glist *x, int wholething)
......
......@@ -114,7 +114,7 @@ static void toggle__motionhook(t_scalehandle *sh, t_floatarg mouse_x, t_floatarg
{
if (mouse_y > y2)
d = mouse_y - y2;
else if (abs(mouse_y - y2) < abs(mouse_x - x2))
else if (abs((int)(mouse_y - y2)) < abs((int)(mouse_x - x2)))
d = mouse_y - y2;
else
d = mouse_x - x2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment