diff --git a/pd/src/d_fftroutine.c b/pd/src/d_fftroutine.c
index 0222a0c006ac522e93e1334f4ea5e59cf13eab86..5c841f24a97f698c78a07879ea3743c6b05169bb 100644
--- a/pd/src/d_fftroutine.c
+++ b/pd/src/d_fftroutine.c
@@ -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, 
diff --git a/pd/src/d_math.c b/pd/src/d_math.c
index 7b385c8bf9df003de5c2e03661ee70c289d9d4ba..c58eb31886026f3a2d0b0e018fcf53708bee3314 100644
--- a/pd/src/d_math.c
+++ b/pd/src/d_math.c
@@ -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);
diff --git a/pd/src/d_soundfile.c b/pd/src/d_soundfile.c
index 85d6c573996e036014feea741717fafcb278dcd4..891c191a9a6430fccf0a97de69026f7a8ef4d2f7 100644
--- a/pd/src/d_soundfile.c
+++ b/pd/src/d_soundfile.c
@@ -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)
 {
diff --git a/pd/src/d_ugen.c b/pd/src/d_ugen.c
index da6c94aebe29b5cf588294741adb26a934e54067..5e9ea9bba8e739eabf337754ce83016bbedcfdc8 100644
--- a/pd/src/d_ugen.c
+++ b/pd/src/d_ugen.c
@@ -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,
diff --git a/pd/src/g_clone.c b/pd/src/g_clone.c
index 7ef9cd49f1aea7531bb8553af21447930a388012..ade8cddd5e9f789e103030608076bee555969e27 100644
--- a/pd/src/g_clone.c
+++ b/pd/src/g_clone.c
@@ -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;
diff --git a/pd/src/import.c b/pd/src/import.c
index 039dce878b1909b550028799a79832141d2f12a1..f04bf5facb418686b3376b7485c0386be0cd23d9 100644
--- a/pd/src/import.c
+++ b/pd/src/import.c
@@ -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);
diff --git a/pd/src/m_binbuf.c b/pd/src/m_binbuf.c
index db7cbff15ac67ba864cc9cfaf6fea4b8141990b0..1b96e33d3ac05fecf798498b3277e80ce47a104c 100644
--- a/pd/src/m_binbuf.c
+++ b/pd/src/m_binbuf.c
@@ -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);
diff --git a/pd/src/m_class.c b/pd/src/m_class.c
index 00e8287826cf69f9973016b8a2830808928994da..a9ed52ad9c48003b6d2f5d8aba198242f5288041 100644
--- a/pd/src/m_class.c
+++ b/pd/src/m_class.c
@@ -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;
 
diff --git a/pd/src/m_glob.c b/pd/src/m_glob.c
index 1f2b49bbff9a19718e87201fc7ea5aae765cf760..87f00fb38df85531c42ee47c8f0c2a6a76f19738 100644
--- a/pd/src/m_glob.c
+++ b/pd/src/m_glob.c
@@ -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,
diff --git a/pd/src/m_pd.c b/pd/src/m_pd.c
index 0583c213c04eae1e7f5ecedc3836b9f2ccc52c08..04fed7e385918646cc911d1edd74e79e67344f91 100644
--- a/pd/src/m_pd.c
+++ b/pd/src/m_pd.c
@@ -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"
 
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index 1c3467410abe59408a82b81e0273c678fd3e1d64..4972e75743e6473947639e9e14b46aab8d6ddd17 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.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);
diff --git a/pd/src/m_sched.c b/pd/src/m_sched.c
index b47e8a40f113fca6c4ed1637ba5fe5f854f16cf7..55c464c6e6f0f8ceb87c8e74cb174b83e38b53bb 100644
--- a/pd/src/m_sched.c
+++ b/pd/src/m_sched.c
@@ -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:");
diff --git a/pd/src/s_audio.c b/pd/src/s_audio.c
index d535928f3a996e83e10d2f585e66dd74312ef97e..6573adbf93153cde605b8a9726fe20472a426960 100644
--- a/pd/src/s_audio.c
+++ b/pd/src/s_audio.c
@@ -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;
diff --git a/pd/src/s_audio_alsa.c b/pd/src/s_audio_alsa.c
index 4726d004e3087b2faedd0bbbc332dddda0d286de..cb59b0966f7d29fbdc4773c6be4bb18d79575134 100644
--- a/pd/src/s_audio_alsa.c
+++ b/pd/src/s_audio_alsa.c
@@ -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
diff --git a/pd/src/s_audio_oss.c b/pd/src/s_audio_oss.c
index f7f7a1934ab80ec9ee8a23a883c6817b3357411f..c2153ab353b5cb3d77cd435f84a5dd1f833bbeed 100644
--- a/pd/src/s_audio_oss.c
+++ b/pd/src/s_audio_oss.c
@@ -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;
diff --git a/pd/src/s_file.c b/pd/src/s_file.c
index c12bb98b69cf8b650f151814ba0393f8f0c60db5..22d660f29af432a69c10196dfd8d1f5da9c95fcc 100644
--- a/pd/src/s_file.c
+++ b/pd/src/s_file.c
@@ -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];
diff --git a/pd/src/s_main.c b/pd/src/s_main.c
index cbfae74ed97149bf9e619985e66262d29dd07c63..2f2f0d821bfdfe0020b5537c4cec0d3d74c1aeb5 100644
--- a/pd/src/s_main.c
+++ b/pd/src/s_main.c
@@ -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)
 {
diff --git a/pd/src/s_midi.c b/pd/src/s_midi.c
index 289d702433ff094b913db0415de5f2dfcb29d55a..51ffb91dffd002ffe7ecdac55ba68250a5726053 100644
--- a/pd/src/s_midi.c
+++ b/pd/src/s_midi.c
@@ -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;
diff --git a/pd/src/s_midi_alsa.c b/pd/src/s_midi_alsa.c
index bcffa7d3dbf5df04743ab2525151e52f8a74258d..2267eece20ce418766b778f4dbdb780f3746b286 100644
--- a/pd/src/s_midi_alsa.c
+++ b/pd/src/s_midi_alsa.c
@@ -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;
diff --git a/pd/src/s_path.c b/pd/src/s_path.c
index a4b108cff4898947a525714ba5f38b8008105f8b..152bd4149381744f0f39e5f93950c89025bb0fe2 100644
--- a/pd/src/s_path.c
+++ b/pd/src/s_path.c
@@ -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 */
diff --git a/pd/src/s_print.c b/pd/src/s_print.c
index 715df30c5b303217b4ec0fb81ec93035fe6c6fff..f9600704c324172118624e1c07d00b5e6938cb3e 100644
--- a/pd/src/s_print.c
+++ b/pd/src/s_print.c
@@ -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);
diff --git a/pd/src/x_arithmetic.c b/pd/src/x_arithmetic.c
index 1f6600178393d41321e4d1a48a2fe36fb00aa8f7..94f1a5be95f422f721099587f90399bc864c2157 100644
--- a/pd/src/x_arithmetic.c
+++ b/pd/src/x_arithmetic.c
@@ -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);
diff --git a/pd/src/x_array.c b/pd/src/x_array.c
index 27c6d1b02141cb626a9c214899317bb082a8064a..67471549dee81f54c40c34301c77b346941328c4 100644
--- a/pd/src/x_array.c
+++ b/pd/src/x_array.c
@@ -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))
diff --git a/pd/src/x_connective.c b/pd/src/x_connective.c
index 5aaade46b14354c4d068c730ff920d29108b2d01..2e61671dcb9802030c7657e506a822c148e5c137 100644
--- a/pd/src/x_connective.c
+++ b/pd/src/x_connective.c
@@ -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)
 {
diff --git a/pd/src/x_midi.c b/pd/src/x_midi.c
index 4926b223c2e5945b0956b3f0180ff26431e939fd..c827ea7375cbd2a31eb08dfe3484ea5ca41217e7 100644
--- a/pd/src/x_midi.c
+++ b/pd/src/x_midi.c
@@ -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);
diff --git a/pd/src/x_misc.c b/pd/src/x_misc.c
index e468fe31eba04bb9e9398937f7a037180360858b..a0ccae4ccd8a01ca7b1671575454a3072b58755c 100644
--- a/pd/src/x_misc.c
+++ b/pd/src/x_misc.c
@@ -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)
diff --git a/pd/src/x_net.c b/pd/src/x_net.c
index ed7aa2ec0bc57d53e14ecf582fbce1415ae22439..e81ce245041e3fab868093bcfe770b1ec73674a9 100644
--- a/pd/src/x_net.c
+++ b/pd/src/x_net.c
@@ -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);
diff --git a/pd/src/x_text.c b/pd/src/x_text.c
index d61ef6ab5af13e3829eb99c8cf9094a2afa5c011..f8e1a9b3fdab096dde5125b32348190e1eb11b80 100644
--- a/pd/src/x_text.c
+++ b/pd/src/x_text.c
@@ -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);
         binbuf_add(x->x_textbuf.b_binbuf, binbuf_getnatom(b), binbuf_getvec(b));
     }
@@ -914,8 +913,6 @@ static void *text_tolist_new(t_symbol *s, int argc, t_atom *argv)
 static void text_tolist_bang(t_text_tolist *x)
 {
     t_binbuf *b = text_client_getbuf(x), *b2;
-    int n, i, cnt = 0;
-    t_atom *vec;
     if (!b)
        return;
     b2 = binbuf_new();
@@ -1036,10 +1033,9 @@ static void text_search_list(t_text_search *x,
     t_symbol *s, int argc, t_atom *argv)
 {
     t_binbuf *b = text_client_getbuf(&x->x_tc);
-    int i, j, n, lineno, bestline = -1, beststart=-1, bestn, thisstart, thisn,
+    int i, n, lineno, bestline = -1, beststart=-1, thisstart,
         nkeys = x->x_nkeys, failed = 0;
     t_atom *vec;
-    t_key *kp = x->x_keyvec;
     if (!b)
        return;
     if (argc < nkeys)
@@ -1191,10 +1187,10 @@ static void text_search_list(t_text_search *x,
                 }
                 goto nomatch;   /* a tie - keep the old one */
             replace:
-                bestline = lineno, beststart = thisstart, bestn = thisn;
+                bestline = lineno, beststart = thisstart;
             }
                 /* no previous match so we're best */
-            else bestline = lineno, beststart = thisstart, bestn = thisn;
+            else bestline = lineno, beststart = thisstart;
         nomatch:
             lineno++;
             thisstart = i+1;
@@ -1302,7 +1298,7 @@ static void *text_sequence_new(t_symbol *s, int argc, t_atom *argv)
 
 static void text_sequence_doit(t_text_sequence *x, int argc, t_atom *argv)
 {
-    t_binbuf *b = text_client_getbuf(&x->x_tc), *b2;
+    t_binbuf *b = text_client_getbuf(&x->x_tc);
     int n, i, onset, nfield, wait, eatsemi = 1, gotcomma = 0;
     t_atom *vec, *outvec, *ap;
     if (!b)
@@ -1505,7 +1501,7 @@ static void text_sequence_step(t_text_sequence *x)
 
 static void text_sequence_line(t_text_sequence *x, t_floatarg f)
 {
-    t_binbuf *b = text_client_getbuf(&x->x_tc), *b2;
+    t_binbuf *b = text_client_getbuf(&x->x_tc);
     int n, start, end;
     t_atom *vec;
     if (!b)
@@ -1856,7 +1852,7 @@ static void *textfile_new( void)
 static void textfile_bang(t_qlist *x)
 {
     int argc = binbuf_getnatom(x->x_binbuf),
-        count, onset = x->x_onset, onset2;
+        onset = x->x_onset, onset2;
     t_atom *argv = binbuf_getvec(x->x_binbuf);
     t_atom *ap = argv + onset, *ap2;
     while (onset < argc &&