diff --git a/pd/src/d_ugen.c b/pd/src/d_ugen.c
index c2b600a0d8e814299c083b7b9c8ac77400c1705f..fcd2ed083cda46799a981e72f905ec43b424c715 100644
--- a/pd/src/d_ugen.c
+++ b/pd/src/d_ugen.c
@@ -362,7 +362,7 @@ static t_signal *signal_usedlist;
     /* 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 = signal_usedlist)
     {
@@ -429,9 +429,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)
     {
@@ -555,8 +554,6 @@ static t_dspcontext *ugen_currentcontext;
 
 void ugen_stop(void)
 {
-    t_signal *s;
-    int i;
     if (dsp_chain)
     {
         freebytes(dsp_chain, dsp_chainsize * sizeof (t_int));
@@ -612,8 +609,6 @@ t_dspcontext *ugen_start_graph(int toplevel, t_signal **sp,
     int ninlets, int noutlets)
 {
     t_dspcontext *dc = (t_dspcontext *)getbytes(sizeof(*dc));
-    t_float parent_srate, srate;
-    int parent_vecsize, vecsize;
 
     if (ugen_loud) post("ugen_start_graph...");
 
@@ -707,7 +702,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
@@ -860,7 +855,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;
@@ -869,7 +864,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 */
@@ -936,7 +931,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;
@@ -956,7 +950,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;
     }
@@ -1004,7 +997,7 @@ void ugen_done_graph(t_dspcontext *dc)
     for (u = dc->dc_ugenlist; u; u = u->u_next)
     {
         t_pd *zz = &u->u_obj->ob_pd;
-        t_signal **insigs = dc->dc_iosigs, **outsigs = dc->dc_iosigs;
+        t_signal **outsigs = dc->dc_iosigs;
         if (outsigs) outsigs += dc->dc_ninlets;
 
         if (pd_class(zz) == vinlet_class)
diff --git a/pd/src/s_audio.c b/pd/src/s_audio.c
index 0a479c664005309145911ca2633646aa984e9392..1dce94ca59a46a0e6e7e19245234f2f9e0a3a2a0 100644
--- a/pd/src/s_audio.c
+++ b/pd/src/s_audio.c
@@ -155,7 +155,6 @@ static void audio_init( void)
 
 void sys_setchsr(int chin, int chout, int sr)
 {
-    int nblk;
     int inbytes = (chin ? chin : 2) *
                 (DEFDACBLKSIZE*sizeof(t_sample));
     int outbytes = (chout ? chout : 2) *
@@ -199,7 +198,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 i, *ip;
+    int i;
     int defaultchannels = SYS_DEFAULTCH;
     int inchans, outchans, nrealindev, nrealoutdev;
     int realindev[MAXAUDIOINDEV], realoutdev[MAXAUDIOOUTDEV];
@@ -729,10 +728,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: */
diff --git a/pd/src/s_audio_alsamm.c b/pd/src/s_audio_alsamm.c
index 3bc4b36925e05f51abfb560593043ed5f54812b6..9401d20a5d3cfa07744292086f194ee733109562 100644
--- a/pd/src/s_audio_alsamm.c
+++ b/pd/src/s_audio_alsamm.c
@@ -81,11 +81,6 @@
    so  i will change it maybe in future...
 */
 
-static int alsamm_incards = 0;
-static t_alsa_dev *alsamm_indevice[ALSA_MAXDEV];
-static int alsamm_outcards = 0;
-static t_alsa_dev *alsamm_outdevice[ALSA_MAXDEV];
-
 /*
    we need same samplerate, buffertime and so on for
    each card soo we use global vars...
@@ -163,8 +158,6 @@ static void show_availist(void)
 #endif
 
 /* protos */
-static char *alsamm_getdev(int nr);
-
 static int set_hwparams(snd_pcm_t *handle,
                                snd_pcm_hw_params_t *params, int *chs);
 static int set_swparams(snd_pcm_t *handle,
@@ -184,22 +177,15 @@ static void check_error(int err, const char *why)
 
 int alsamm_open_audio(int rate)
 {
-  int err;
-  char devname[80];
-  char *cardname;
+  int err, i;
   snd_pcm_hw_params_t* hw_params;
   snd_pcm_sw_params_t* sw_params;
 
-
   /* fragsize is an old concept now use periods, used to be called fragments. */
   /* Be aware in ALSA periodsize can be in bytes, where buffersize is in frames, 
      but sometimes buffersize is in bytes and periods in frames, crazy alsa...      
      ...we use periodsize and buffersize in frames */
 
-  int i;
-  short* tmp_buf;
-  unsigned int tmp_uint;
-
   snd_pcm_hw_params_alloca(&hw_params);
   snd_pcm_sw_params_alloca(&sw_params);
   
@@ -322,8 +308,6 @@ int alsamm_open_audio(int rate)
   /* check for linked handles of input for each output*/
   
   for(i=0; i<(alsa_noutdev < alsa_nindev ? alsa_noutdev:alsa_nindev); i++){
-    t_alsa_dev *ad = &alsa_outdev[i];
-
     if (alsa_outdev[i].a_devno == alsa_indev[i].a_devno){
       if ((err = snd_pcm_link (alsa_indev[i].a_handle,
                                alsa_outdev[i].a_handle)) == 0){
@@ -430,7 +414,6 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params,int *chs)
 #ifndef ALSAAPI9
   unsigned int rrate;
   int err, dir;
-  int channels_allocated = 0;
 
   /* choose all parameters */
   err = snd_pcm_hw_params_any(handle, params);
@@ -848,8 +831,6 @@ static int alsamm_start()
   int devno;
   int chn,nchns;
 
-  const snd_pcm_channel_area_t *mm_areas;
-
 #ifdef ALSAMM_DEBUG
   if(sys_verbose)
     post("start audio with %d out cards and %d incards",alsamm_outcards,alsamm_incards);
@@ -1354,7 +1335,6 @@ void alsamm_showstat(snd_pcm_t *handle)
 {
   int err;
   snd_pcm_status_t *status;
-  snd_output_t *output = NULL;
 
   snd_pcm_status_alloca(&status);
   if ((err = snd_pcm_status(handle, status)) < 0) {
diff --git a/pd/src/s_midi.c b/pd/src/s_midi.c
index fa2921e2d5c6cb899d49af7f97908d11ddcaf568..c850097c264e7354180dc7ace12db93dbca9f686 100644
--- a/pd/src/s_midi.c
+++ b/pd/src/s_midi.c
@@ -163,7 +163,6 @@ void sys_pollmidioutqueue( void)
 
 static void sys_queuemidimess(int portno, int onebyte, int a, int b, int c)
 {
-    t_midiqelem *midiqelem;
     int newhead = midi_outhead +1;
     if (newhead == MIDIQSIZE)
         newhead = 0;
@@ -448,7 +447,6 @@ void sys_pollmidiinqueue( void)
 void sys_midibytein(int portno, int byte)
 {
     static int warned = 0;
-    t_midiqelem *midiqelem;
     int newhead = midi_inhead +1;
     if (newhead == MIDIQSIZE)
         newhead = 0;
@@ -730,8 +728,6 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
     /* new values from dialog window */
 void glob_midi_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv)
 {
-    int nmidiindev, midiindev[MAXMIDIINDEV];
-    int nmidioutdev, midioutdev[MAXMIDIOUTDEV];
     int i, nindev, noutdev;
     int newmidiindev[4], newmidioutdev[4];
     int alsadevin, alsadevout;
diff --git a/pd/src/s_midi_oss.c b/pd/src/s_midi_oss.c
index 361bb0ad350e9063ea3d52ea2715c4709ea235a5..05c98b0cb7ca9adf79896d77ed899d2a76c6a657 100644
--- a/pd/src/s_midi_oss.c
+++ b/pd/src/s_midi_oss.c
@@ -233,11 +233,9 @@ void sys_poll_midi(void)
 void sys_poll_midi(void)
 {
     int i, throttle = 100;
-    struct timeval timout;
-    int did = 1, maxfd = 0;
+    int did = 1;
     while (did)
     {
-        fd_set readset, writeset, exceptset;
         did = 0;
         if (throttle-- < 0)
             break;
diff --git a/pd/src/u_pdreceive.c b/pd/src/u_pdreceive.c
index e61397edfa6038591917e034138b5d712c20edd2..279ce90cdd15cbb6c00b59f5199107e3508ee358 100644
--- a/pd/src/u_pdreceive.c
+++ b/pd/src/u_pdreceive.c
@@ -52,7 +52,6 @@ int main(int argc, char **argv)
 {
     int portno;
     struct sockaddr_in server;
-    int nretry = 10;
 #ifdef MSW
     short version = MAKEWORD(2, 0);
     WSADATA nobby;
@@ -119,7 +118,6 @@ usage:
 
 static void addport(int fd)
 {
-    int nfd = nfdpoll;
     t_fdpoll *fp;
     fdpoll = (t_fdpoll *)realloc(fdpoll,
         (nfdpoll+1) * sizeof(t_fdpoll));
@@ -138,8 +136,7 @@ static void addport(int fd)
 
 static void rmport(t_fdpoll *x)
 {
-    int nfd = nfdpoll;
-    int i, size = nfdpoll * sizeof(t_fdpoll);
+    int i;
     t_fdpoll *fp;
     for (i = nfdpoll, fp = fdpoll; i--; fp++)
     {
diff --git a/pd/src/u_pdsend.c b/pd/src/u_pdsend.c
index e36ad94a247b7f7d70ff1cebdd3f92bd1a7b24d6..05090420a23da64249938605ce4af835e117ce4e 100644
--- a/pd/src/u_pdsend.c
+++ b/pd/src/u_pdsend.c
@@ -32,7 +32,9 @@ int main(int argc, char **argv)
     struct sockaddr_in server;
     struct hostent *hp;
     char *hostname;
+#if 0
     int nretry = 10;
+#endif
 #ifdef MSW
     short version = MAKEWORD(2, 0);
     WSADATA nobby;