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/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_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_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_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_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);