Commit c682616b authored by Jonathan Wilkes's avatar Jonathan Wilkes

Merge branch 'cleanup-unused-vars-revised'

parents 8e46bfe6 64230446
......@@ -486,7 +486,7 @@ void load_registers(FFT_NET *fft_net, SAMPLE *buf, int buf_form,
{
int *load_index = fft_net->load_index;
SAMPLE *window;
int index, i = 0, n = fft_net->n;
int index, i = 0;
if (trnsfrm_dir==FORWARD) window = fft_net->window;
else if (trnsfrm_dir==INVERSE) window = fft_net->inv_window;
......@@ -617,7 +617,7 @@ void store_registers(FFT_NET *fft_net, SAMPLE *buf, int buf_form,
{
int i;
SAMPLE real, imag, mag, phase;
SAMPLE real, imag;
int n;
i = 0;
......@@ -992,7 +992,7 @@ void short_to_float(short *short_buf, float *float_buf, int n)
void pd_fft(t_float *buf, int npoints, int inverse)
{
double renorm;
SAMPLE *fp, *fp2;
SAMPLE *fp;
int i;
renorm = (inverse ? npoints : 1.);
cfft((inverse ? INVERSE : FORWARD), npoints, RECTANGULAR,
......
......@@ -361,7 +361,7 @@ static t_int *ftom_tilde_perform(t_int *w)
{
t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2);
t_int n = *(t_int *)(w+3);
for (; n--; *in++, out++)
for (; n--; in++, out++)
{
t_sample f = *in;
*out = (f > 0 ? 17.3123405046 * log(.12231220585 * f) : -1500);
......
......@@ -231,7 +231,7 @@ int open_soundfile_via_fd(int fd, int headersize,
int *p_bytespersamp, int *p_bigendian, int *p_nchannels, long *p_bytelimit,
long skipframes)
{
int format, nchannels, bigendian, bytespersamp, swap, sysrtn;
int nchannels, bigendian, bytespersamp, swap, sysrtn;
long bytelimit = 0x7fffffff;
errno = 0;
if (headersize >= 0) /* header detection overridden */
......@@ -1633,7 +1633,6 @@ static void *readsf_child_main(void *zz)
}
else if (x->x_requestcode == REQUEST_OPEN)
{
char boo[80];
int sysrtn, wantbytes;
/* copy file stuff out of the data structure so we can
......@@ -1950,7 +1949,7 @@ static t_int *readsf_perform(t_int *w)
t_sample *fp;
if (x->x_state == STATE_STREAM)
{
int wantbytes, nchannels, sfchannels = x->x_sfchannels;
int wantbytes, sfchannels = x->x_sfchannels;
pthread_mutex_lock(&x->x_mutex);
wantbytes = sfchannels * vecsize * bytespersample;
while (
......@@ -2189,14 +2188,10 @@ static void *writesf_child_main(void *zz)
}
else if (x->x_requestcode == REQUEST_OPEN)
{
char boo[80];
int fd, sysrtn, writebytes;
/* copy file stuff out of the data structure so we can
relinquish the mutex while we're in open_soundfile(). */
long onsetframes = x->x_onsetframes;
long bytelimit = 0x7fffffff;
int skipheaderbytes = x->x_skipheaderbytes;
int bytespersample = x->x_bytespersample;
int sfchannels = x->x_sfchannels;
int bigendian = x->x_bigendian;
......@@ -2360,7 +2355,6 @@ static void *writesf_child_main(void *zz)
if (x->x_fd >= 0)
{
int bytesperframe = x->x_bytespersample * x->x_sfchannels;
int bigendian = x->x_bigendian;
char *filename = x->x_filename;
int fd = x->x_fd;
int filetype = x->x_filetype;
......@@ -2397,7 +2391,8 @@ static void *writesf_child_main(void *zz)
/******** the object proper runs in the calling (parent) thread ****/
static void writesf_tick(t_writesf *x);
/* Not sure why this is declared here so commenting it out... */
//static void writesf_tick(t_writesf *x);
static void *writesf_new(t_floatarg fnchannels, t_floatarg fbufsize)
{
......
......@@ -365,7 +365,7 @@ static t_signal *signal_freeborrowed;
/* call this when DSP is stopped to free all the signals */
void signal_cleanup(void)
{
t_signal **svec, *sig, *sig2;
t_signal *sig;
int i;
while ((sig = pd_this->pd_signals))
{
......@@ -432,9 +432,8 @@ void signal_makereusable(t_signal *sig)
t_signal *signal_new(int n, t_float sr)
{
int logn, n2, vecsize = 0;
int logn, vecsize = 0;
t_signal *ret, **whichlist;
t_sample *fp;
logn = ilog2(n);
if (n)
{
......@@ -566,8 +565,6 @@ t_signal *signal_newfromcontext(int borrowed)
void ugen_stop(void)
{
t_signal *s;
int i;
if (pd_this->pd_dspchain)
{
freebytes(pd_this->pd_dspchain,
......@@ -624,7 +621,6 @@ t_dspcontext *ugen_start_graph(int toplevel, t_signal **sp,
int ninlets, int noutlets)
{
t_dspcontext *dc = (t_dspcontext *)getbytes(sizeof(*dc));
int parent_vecsize, vecsize;
if (ugen_loud) post("ugen_start_graph...");
......@@ -729,7 +725,7 @@ static void ugen_doit(t_dspcontext *dc, t_ugenbox *u)
{
t_sigoutlet *uout;
t_siginlet *uin;
t_sigoutconnect *oc, *oc2;
t_sigoutconnect *oc;
t_class *class = pd_class(&u->u_obj->ob_pd);
int i, n;
/* suppress creating new signals for the outputs of signal
......@@ -882,7 +878,7 @@ static void ugen_doit(t_dspcontext *dc, t_ugenbox *u)
void ugen_done_graph(t_dspcontext *dc)
{
t_ugenbox *u, *u2;
t_ugenbox *u;
t_sigoutlet *uout;
t_siginlet *uin;
t_sigoutconnect *oc, *oc2;
......@@ -891,7 +887,7 @@ void ugen_done_graph(t_dspcontext *dc)
t_dspcontext *parent_context = dc->dc_parentcontext;
t_float parent_srate;
int parent_vecsize;
int period, frequency, phase, vecsize, calcsize;
int period, frequency, vecsize, calcsize;
t_float srate;
int chainblockbegin; /* DSP chain onset before block prolog code */
int chainblockend; /* and after block epilog code */
......@@ -958,7 +954,6 @@ void ugen_done_graph(t_dspcontext *dc)
(parent_vecsize * realoverlap * upsample);
frequency = (parent_vecsize * realoverlap * upsample)/
(vecsize * downsample);
phase = blk->x_phase;
srate = parent_srate * realoverlap * upsample / downsample;
if (period < 1) period = 1;
if (frequency < 1) frequency = 1;
......@@ -978,7 +973,6 @@ void ugen_done_graph(t_dspcontext *dc)
calcsize = (parent_context ? parent_context->dc_calcsize : vecsize);
downsample = upsample = 1;
period = frequency = 1;
phase = 0;
if (!parent_context) reblock = 1;
switched = 0;
}
......@@ -1031,7 +1025,7 @@ void ugen_done_graph(t_dspcontext *dc)
if (pd_class(zz) == vinlet_class)
vinlet_dspprolog((struct _vinlet *)zz,
dc->dc_iosigs, vecsize, calcsize, dsp_phase, period, frequency,
insigs, vecsize, calcsize, dsp_phase, period, frequency,
downsample, upsample, reblock, switched);
else if (pd_class(zz) == voutlet_class)
voutlet_dspprolog((struct _voutlet *)zz,
......
......@@ -125,7 +125,7 @@ static void clone_in_set(t_in *x, t_floatarg f)
static void clone_in_all(t_in *x, t_symbol *s, int argc, t_atom *argv)
{
int phasewas = x->i_owner->x_phase, i;
int i;
for (i = 0; i < x->i_owner->x_n; i++)
{
x->i_owner->x_phase = i;
......@@ -145,7 +145,7 @@ static void clone_in_vis(t_in *x, t_floatarg fn, t_floatarg vis)
static void clone_out_anything(t_out *x, t_symbol *s, int argc, t_atom *argv)
{
t_atom *outv, *ap;
t_atom *outv;
int first =
1 + (s != &s_list && s != &s_float && s != &s_symbol && s != &s_bang),
outc = argc + first;
......
......@@ -122,7 +122,6 @@ static void import_rewind(t_import* x)
static void *import_new(t_symbol *s, int argc, t_atom *argv)
{
t_import *x = (t_import *)pd_new(import_class);
t_symbol *currentdir;
x->x_data_outlet = outlet_new(&x->x_obj, &s_symbol);
x->x_status_outlet = outlet_new(&x->x_obj, 0);
......
......@@ -687,7 +687,6 @@ void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv)
t_atom *at = x->b_vec;
int ac = x->b_n;
int nargs, maxnargs = 0;
int at_arg = 0;
//first we need to check if the list of arguments has $@
//fprintf(stderr,"=========\nbinbuf_eval argc:%d ac:%d\n", argc, (int)ac);
......
......@@ -601,16 +601,6 @@ t_symbol *gensym(const char *s)
return(dogensym(s, 0));
}
static t_symbol *addfileextent(t_symbol *s)
{
char namebuf[FILENAME_MAX], *str = s->s_name;
int ln = strlen(str);
if (!strcmp(str + ln - 3, ".pd")) return (s);
strcpy(namebuf, str);
strcpy(namebuf+ln, ".pd");
return (gensym(namebuf));
}
#define MAXOBJDEPTH 1000
static int tryingalready;
......
......@@ -167,6 +167,8 @@ void glob_init(void)
gensym("version"), A_FLOAT, 0);
class_addmethod(glob_pdobject, (t_method)glob_perf,
gensym("perf"), A_FLOAT, 0);
class_addmethod(glob_pdobject, (t_method)glob_compatibility,
gensym("compatibility"), A_FLOAT, 0);
class_addmethod(glob_pdobject, (t_method)glob_clipboard_text,
gensym("clipboardtext"), A_FLOAT, 0);
class_addmethod(glob_pdobject, (t_method)glob_gui_prefs,
......
......@@ -3,6 +3,7 @@
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
#include <stdlib.h>
#include <string.h>
#include "m_pd.h"
#include "m_imp.h"
......
......@@ -356,6 +356,7 @@ EXTERN void binbuf_restore(t_binbuf *x, int argc, t_atom *argv);
EXTERN void binbuf_print(t_binbuf *x);
EXTERN int binbuf_getnatom(t_binbuf *x);
EXTERN t_atom *binbuf_getvec(t_binbuf *x);
EXTERN int binbuf_resize(t_binbuf *x, int newsize);
EXTERN void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv);
EXTERN int binbuf_read(t_binbuf *b, char *filename, char *dirname,
int crflag);
......
......@@ -220,7 +220,7 @@ static int sys_histphase;
int sys_addhist(int phase)
{
int i, j, phasewas = sys_histphase;
int j, phasewas = sys_histphase;
double newtime = sys_getrealtime();
int msec = (newtime - sys_histtime) * 1000.;
for (j = NBIN-1; j >= 0; j--)
......@@ -259,7 +259,7 @@ static char *(oss_errornames[]) = {
void glob_audiostatus(void)
{
int dev, nresync, nresyncphase, i;
int nresync, nresyncphase, i;
nresync = (oss_nresync >= NRESYNC ? NRESYNC : oss_nresync);
nresyncphase = oss_resyncphase - 1;
post("audio I/O error history:");
......
......@@ -221,7 +221,7 @@ void sys_set_audio_settings(int naudioindev, int *audioindev, int nchindev,
int *chindev, int naudiooutdev, int *audiooutdev, int nchoutdev,
int *choutdev, int rate, int advance, int callback, int blocksize)
{
int i, *ip;
int i;
int defaultchannels = SYS_DEFAULTCH;
int inchans, outchans, nrealindev, nrealoutdev;
int realindev[MAXAUDIOINDEV], realoutdev[MAXAUDIOOUTDEV];
......@@ -711,7 +711,7 @@ static void sys_listaudiodevs(void )
/* start an audio settings dialog window */
void glob_audio_properties(t_pd *dummy, t_floatarg flongform)
{
char buf[1024 + 2 * MAXNDEV*(DEVDESCSIZE+4)];
//char buf[1024 + 2 * MAXNDEV*(DEVDESCSIZE+4)];
/* these are the devices you're using: */
int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV];
int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV];
......@@ -774,10 +774,10 @@ void glob_audio_properties(t_pd *dummy, t_floatarg flongform)
audiooutchan4 = (naudiooutdev > 3 ? choutdev[3] : 0);
// sprintf(buf,
//"pdtk_audio_dialog %%s \
//%d %d %d %d %d %d %d %d \
//%d %d %d %d %d %d %d %d \
//%d %d %d %d %d %d\n",
//"pdtk_audio_dialog %%s "
//"%d %d %d %d %d %d %d %d "
//"%d %d %d %d %d %d %d %d "
//"%d %d %d %d %d %d\n",
// audioindev1, audioindev2, audioindev3, audioindev4,
// audioinchan1, audioinchan2, audioinchan3, audioinchan4,
// audiooutdev1, audiooutdev2, audiooutdev3, audiooutdev4,
......@@ -834,10 +834,7 @@ extern int pa_foo;
/* new values from dialog window */
void glob_audio_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv)
{
int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV];
int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV];
int rate, advance, audioon, i, nindev, noutdev;
int audioindev1, audioinchan1, audiooutdev1, audiooutchan1;
int i, nindev, noutdev;
int newaudioindev[4], newaudioinchan[4],
newaudiooutdev[4], newaudiooutchan[4];
/* the new values the dialog came back with: */
......@@ -1145,7 +1142,7 @@ int sys_audiodevnametonumber(int output, const char *name)
void sys_audiodevnumbertoname(int output, int devno, char *name, int namesize)
{
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
int nindevs = 0, noutdevs = 0, i, canmulti, cancallback;
int nindevs = 0, noutdevs = 0, canmulti, cancallback;
if (devno < 0)
{
*name = 0;
......
......@@ -235,12 +235,10 @@ int alsa_open_audio(int naudioindev, int *audioindev, int nchindev,
int *chindev, int naudiooutdev, int *audiooutdev, int nchoutdev,
int *choutdev, int rate, int blocksize)
{
int err, inchans = 0, outchans = 0, subunitdir;
int err, inchans = 0, outchans = 0;
char devname[512];
snd_output_t* out;
int frag_size = (blocksize ? blocksize : ALSA_DEFFRAGSIZE);
int nfrags, i, iodev, dev2;
int wantinchans, wantoutchans, device;
nfrags = sys_schedadvance * (float)rate / (1e6 * frag_size);
/* save our belief as to ALSA's buffer size for later */
......@@ -393,12 +391,12 @@ void alsa_close_audio(void)
int alsa_send_dacs(void)
{
static double timenow;
#ifdef DEBUG_ALSA_XFER
static int xferno = 0;
static int callno = 0;
double timelast = timenow;
#endif
static double timenow;
double timelast;
t_sample *fp1, *fp2;
int i, j, k, iodev, result, ch;
int chansintogo, chansouttogo;
......@@ -414,7 +412,6 @@ int alsa_send_dacs(void)
chansouttogo = sys_outchannels;
transfersize = DEFDACBLKSIZE;
timelast = timenow;
timenow = sys_getrealtime();
#ifdef DEBUG_ALSA_XFER
......
......@@ -48,9 +48,6 @@ typedef int32_t t_oss_int32;
#define OSS_XFERSIZE(chans, width) (DEFDACBLKSIZE * (chans) * (width))
/* GLOBALS */
static int linux_meters; /* true if we're metering */
static t_sample linux_inmax; /* max input amplitude */
static t_sample linux_outmax; /* max output amplitude */
static int linux_fragsize = 0; /* for block mode; block size (sample frames) */
extern int audio_blocksize; /* stolen from s_audio.c */
/* our device handles */
......@@ -77,7 +74,6 @@ t_sample *sys_soundin;
/* OSS-specific private variables */
static int oss_blockmode = 1; /* flag to use "blockmode" */
static char ossdsp[] = "/dev/dsp%d";
/* don't assume we can turn all 31 bits when doing float-to-fix;
otherwise some audio drivers (e.g. Midiman/ALSA) wrap around. */
......@@ -131,9 +127,8 @@ int oss_reset(int fd) {
void oss_configure(t_oss_dev *dev, int srate, int dac, int skipblocksize,
int suggestedblocksize)
{
int orig, param, nblk, fd = dev->d_fd, wantformat;
int orig, param, fd = dev->d_fd, wantformat;
int nchannels = dev->d_nchannels;
int advwas = sys_schedadvance;
audio_buf_info ainfo;
......@@ -272,10 +267,7 @@ int oss_open_audio(int nindev, int *indev, int nchin, int *chin,
char devname[20];
int n, i, fd, flags;
char buf[OSS_MAXSAMPLEWIDTH * DEFDACBLKSIZE * OSS_MAXCHPERDEV];
int num_devs = 0;
int wantmore=0;
int spread = 0;
audio_buf_info ainfo;
linux_nindevs = linux_noutdevs = 0;
/* mark devices unopened */
......@@ -551,7 +543,7 @@ in audio output and/or input. */
static void oss_doresync( void)
{
int dev, zeroed = 0, wantsize;
int dev, zeroed = 0;
char buf[OSS_MAXSAMPLEWIDTH * DEFDACBLKSIZE * OSS_MAXCHPERDEV];
audio_buf_info ainfo;
......@@ -630,11 +622,9 @@ static void oss_doresync( void)
int oss_send_dacs(void)
{
t_sample *fp1, *fp2;
long fill;
int i, j, dev, rtnval = SENDDACS_YES;
char buf[OSS_MAXSAMPLEWIDTH * DEFDACBLKSIZE * OSS_MAXCHPERDEV];
t_oss_int16 *sp;
t_oss_int32 *lp;
/* the maximum number of samples we should have in the ADC buffer */
int idle = 0;
int thischan;
......@@ -675,7 +665,6 @@ int oss_send_dacs(void)
for (dev = 0;dev < linux_nindevs; dev++)
if (linux_adcs[dev].d_space == 0)
{
audio_buf_info ainfo;
sys_microsleep(2000);
oss_calcspace();
if (linux_adcs[dev].d_space != 0) continue;
......
......@@ -493,6 +493,8 @@ static int check_exists(const char*path)
}
#endif
extern void sys_expandpathelems(const char *name, char *result);
void sys_loadpreferences( void)
{
int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV];
......
......@@ -284,6 +284,8 @@ void glob_forward_files_from_secondary_instance(void)
gui_end_vmess();
}
extern void glob_recent_files(t_pd *dummy);
/* this is called from main() in s_entry.c */
int sys_main(int argc, char **argv)
{
......
......@@ -703,7 +703,7 @@ extern t_class *glob_pdobject;
/* start a midi settings dialog window */
void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
{
char buf[1024 + 2 * MAXNDEV*(DEVDESCSIZE+4)];
//char buf[1024 + 2 * MAXNDEV*(DEVDESCSIZE+4)];
/* these are the devices you're using: */
int nindev, midiindev[MAXMIDIINDEV];
int noutdev, midioutdev[MAXMIDIOUTDEV];
......@@ -780,9 +780,9 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
if (sys_midiapi == API_ALSA)
{
// sprintf(buf,
//"pdtk_alsa_midi_dialog %%s \
//%d %d %d %d %d %d %d %d \
//%d 1\n",
//"pdtk_alsa_midi_dialog %%s "
//"%d %d %d %d %d %d %d %d "
//"%d 1\n",
// midiindev1, midiindev2, midiindev3, midiindev4,
// midioutdev1, midioutdev2, midioutdev3, midioutdev4,
// (flongform != 0));
......@@ -795,9 +795,9 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
gui_end_array();
gui_end_vmess();
// sprintf(buf,
//"pdtk_midi_dialog %%s \
//%d %d %d %d %d %d %d %d \
//%d\n",
//"pdtk_midi_dialog %%s "
//"%d %d %d %d %d %d %d %d "
//"%d\n",
// midiindev1, midiindev2, midiindev3, midiindev4,
// midioutdev1, midioutdev2, midioutdev3, midioutdev4,
// (flongform != 0));
......@@ -928,7 +928,7 @@ int sys_mididevnametonumber(int output, const char *name)
void sys_mididevnumbertoname(int output, int devno, char *name, int namesize)
{
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
int nindevs = 0, noutdevs = 0, i;
int nindevs = 0, noutdevs = 0;
if (devno < 0)
{
*name = 0;
......
......@@ -242,7 +242,6 @@ static int alsa_nmidiindevs, alsa_nmidioutdevs, alsa_initted;
void midi_alsa_init(void)
{
int i;
if (alsa_initted)
return;
alsa_initted = 1;
......
......@@ -513,7 +513,7 @@ FILE *sys_fopen(const char *filename, const char *mode)
#include <stdarg.h>
int sys_open(const char *path, int oflag, ...)
{
int i, fd;
int fd;
char pathbuf[MAXPDSTRING];
sys_bashfilename(path, pathbuf);
if (oflag & O_CREAT)
......@@ -770,26 +770,20 @@ t_symbol *sys_decodedialog(t_symbol *s)
/* start a search path dialog window */
void glob_start_path_dialog(t_pd *dummy)
{
char buf[MAXPDSTRING];
int i;
t_namelist *nl;
//sys_gui("global pd_path; set pd_path {}\n");
gui_start_vmess("gui_path_properties", "xii",
dummy,
sys_usestdpath,
sys_verbose
);
gui_start_array();
for (nl = sys_searchpath, i = 0; nl; nl = nl->nl_next, i++)
for (nl = sys_searchpath; nl; nl = nl->nl_next)
{
//sys_vgui("lappend pd_path {%s}\n", nl->nl_string);
gui_s(nl->nl_string);
}
gui_end_array();
gui_end_vmess();
//sprintf(buf, "pdtk_path_dialog %%s %d %d\n", sys_usestdpath, sys_verbose);
//gfxstub_new(&glob_pdobject, (void *)glob_start_path_dialog, buf);
}
/* new values from dialog window */
......@@ -811,27 +805,20 @@ void glob_path_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv)
/* start a startup dialog window */
void glob_start_startup_dialog(t_pd *dummy)
{
char buf[MAXPDSTRING];
int i;
t_namelist *nl;
//sys_gui("global pd_startup; set pd_startup {}\n");
gui_start_vmess("gui_lib_properties", "xis",
dummy,
sys_defeatrt,
sys_flags->s_name
);
gui_start_array();
for (nl = sys_externlist, i = 0; nl; nl = nl->nl_next, i++)
for (nl = sys_externlist; nl; nl = nl->nl_next)
{
//sys_vgui("lappend pd_startup {%s}\n", nl->nl_string);
gui_s(nl->nl_string);
}
gui_end_array();
gui_end_vmess();
//sprintf(buf, "pdtk_startup_dialog %%s %d \"%s\"\n", sys_defeatrt,
// sys_flags->s_name);
//gfxstub_new(&glob_pdobject, (void *)glob_start_startup_dialog, buf);
}
/* new values from dialog window */
......
......@@ -89,7 +89,6 @@ static void dologpost(const void *object, const int level, const char *s)
}
else
{
char obuf[MAXPDSTRING];
//sys_vgui("::pdwindow::logpost {%s} %d {%s}\n",
//strnpointerid(obuf, object, MAXPDSTRING),
//level, strnescape(upbuf, s, MAXPDSTRING));
......@@ -133,8 +132,6 @@ void logpost(const void *object, const int level, const char *fmt, ...)
{
char buf[MAXPDSTRING];
va_list ap;
t_int arg[8];
int i;
va_start(ap, fmt);
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
......
......@@ -758,7 +758,6 @@ void x_arithmetic_setup(void)
{
t_symbol *binop1_sym = gensym("operators");
t_symbol *binop23_sym = gensym("otherbinops");
t_symbol *math_sym = gensym("math");
binop1_plus_class = class_new(gensym("+"), (t_newmethod)binop1_plus_new, 0,
sizeof(t_binop), 0, A_DEFFLOAT, 0);
......
......@@ -533,10 +533,8 @@ static int array_rangeop_getrange(t_array_rangeop *x,
{
t_glist *glist;
t_array *a = array_client_getbuf(&x->x_tc, &glist);
char *elemp;
int stride, fieldonset, arrayonset, nitem, i, type;
int stride, fieldonset, arrayonset, nitem, type;
t_symbol *arraytype;
double sum;
t_template *template;
if (!a)
return (0);
......@@ -720,8 +718,8 @@ static void array_random_seed(t_array_random *x, t_floatarg f)
static void array_random_bang(t_array_random *x)
{
char *itemp, *firstitem;
int stride, nitem, arrayonset, i;
char *firstitem;
int stride, nitem, arrayonset;
if (!array_rangeop_getrange(&x->x_r, &firstitem, &nitem, &stride,
&arrayonset))
......
......@@ -135,6 +135,8 @@ static void pdsymbol_anything(t_pdsymbol *x, t_symbol *s, int ac, t_atom *av)
empty lists aren't equivalent to "bang"??? Should Pd's message passer
always check and call the more specific method, or should it be the
object's responsibility? Dunno... */
/* Currently this function isn't used... */
/*
static void pdsymbol_list(t_pdsymbol *x, t_symbol *s, int ac, t_atom *av)
{
if (!ac)
......@@ -143,6 +145,7 @@ static void pdsymbol_list(t_pdsymbol *x, t_symbol *s, int ac, t_atom *av)
pdsymbol_symbol(x, av->a_w.w_symbol);
else pdsymbol_anything(x, s, ac, av);
}
*/
void pdsymbol_setup(void)
{
......
......@@ -945,7 +945,6 @@ static void *stripnote_new(void )
static void stripnote_float(t_stripnote *x, t_float f)
{
t_hang *hang;
if (!x->x_velo) return;
outlet_float(x->x_velout, x->x_velo);
outlet_float(x->x_pitchout, f);
......
......@@ -420,7 +420,7 @@ typedef struct _oscparse
static t_symbol *grabstring(int argc, t_atom *argv, int *ip, int slash)
{
char buf[MAXPDSTRING];
int first, nchar;
int nchar;
if (slash)
while (*ip < argc && argv[*ip].a_w.w_float == '/')
(*ip)++;
......@@ -681,7 +681,7 @@ static void oscformat_list(t_oscformat *x, t_symbol *s, int argc, t_atom *argv)
msgindex += ROUNDUPTO4(strlen(argv[j].a_w.w_symbol->s_name) + 1);
else if (typecode == 'b')
{
int blobsize = 0x7fffffff, blobindex;
int blobsize = 0x7fffffff;
/* check if we have a nonnegative size field */
if (argv[j].a_type == A_FLOAT &&
(int)(argv[j].a_w.w_float) >= 0)
......
......@@ -122,7 +122,6 @@ static void netsend_readbin(t_netsend *x, int fd)
static void netsend_doit(void *z, t_binbuf *b)
{
t_atom messbuf[1024];
t_netsend *x = (t_netsend *)z;
int msg, natom = binbuf_getnatom(b);
t_atom *at = binbuf_getvec(b);
......
......@@ -246,7 +246,7 @@ static int text_nthline(int n, t_atom *vec, int line, int *startp, int *endp)
{
if (cnt == line)
{
int j = i, outc, k;
int j = i;
while (j < n && vec[j].a_type != A_SEMI &&
vec[j].a_type != A_COMMA)
j++;
......@@ -343,7 +343,6 @@ static void text_define_frompointer(t_text_define *x, t_gpointer *gp,
gp, s, "text_frompointer");
if (b)
{
t_gstub *gs = gp->gp_stub;
binbuf_clear(x->x_textbuf.b_binbuf);