
--- libguile/filesys.c.orig	2011-09-24 23:58:54.019115830 +0100
+++ libguile/filesys.c	2011-09-24 23:59:36.196116463 +0100
@@ -901,7 +901,7 @@
   {
     struct dirent_or_dirent64 de; /* just for sizeof */
     DIR    *ds = (DIR *) SCM_CELL_WORD_1 (port);
-    size_t namlen;
+/*     size_t namlen; */
 #ifdef NAME_MAX
     char   buf [SCM_MAX (sizeof (de),
                          sizeof (de) - sizeof (de.d_name) + NAME_MAX + 1)];
@@ -921,8 +921,6 @@
     if (! rdent)
       return SCM_EOF_VAL;
 
-    namlen = NAMLEN (rdent);
-
     return (rdent ? scm_from_locale_stringn (rdent->d_name, NAMLEN (rdent))
             : SCM_EOF_VAL);
   }
--- libguile/fports.c.orig	2011-09-24 23:42:26.315100997 +0100
+++ libguile/fports.c	2011-09-24 23:43:06.747101742 +0100
@@ -828,11 +828,11 @@
 	    {
 	      const char *msg = "Error: could not flush file-descriptor ";
 	      char buf[11];
-	      size_t written;
+/* 	      size_t written; */
 
-	      written = write (2, msg, strlen (msg));
+	      write (2, msg, strlen (msg));
 	      sprintf (buf, "%d\n", fp->fdes);
-	      written = write (2, buf, strlen (buf));
+	      write (2, buf, strlen (buf));
 
 	      count = remaining;
 	    }
--- libguile/gc-segment.c.orig	2011-09-24 23:43:28.266101937 +0100
+++ libguile/gc-segment.c	2011-09-24 23:44:31.864103031 +0100
@@ -89,7 +89,7 @@
   size_t mem_needed = (1+card_count) * SCM_GC_SIZEOF_CARD
     + SCM_GC_CARD_BVEC_SIZE_IN_LONGS * card_count * SCM_SIZEOF_LONG
     ;
-  scm_t_c_bvec_long * bvec_ptr = 0;
+/*   scm_t_c_bvec_long * bvec_ptr = 0; */
   scm_t_cell *  memory = 0;
 
   /*
@@ -107,8 +107,6 @@
 
   segment->freelist->heap_size += scm_i_segment_cell_count (segment);
   
-  bvec_ptr = (scm_t_c_bvec_long*) segment->bounds[1];
-
   /*
     Don't init the mem or the bitvector. This is handled by lazy
     sweeping.
--- libguile/posix.c.orig	2011-09-24 23:59:50.134116671 +0100
+++ libguile/posix.c	2011-09-25 00:00:13.280117019 +0100
@@ -1543,12 +1543,12 @@
 	    "The return value is unspecified.")
 #define FUNC_NAME s_scm_nice
 {
-  int nice_value;
+/*   int nice_value; */
 
   /* nice() returns "prio-NZERO" on success or -1 on error, but -1 can arise
      from "prio-NZERO", so an error must be detected from errno changed */
   errno = 0;
-  nice_value = nice (scm_to_int (incr));
+  nice (scm_to_int (incr));
   if (errno != 0)
     SCM_SYSERROR;
 
--- libguile/scmsigs.c.orig	2011-09-24 23:45:06.970103418 +0100
+++ libguile/scmsigs.c	2011-09-24 23:45:32.020103797 +0100
@@ -137,10 +137,10 @@
 static SIGRETTYPE
 take_signal (int signum)
 {
-  size_t count;
+/*   size_t count; */
   char sigbyte = signum;
 
-  count = write (signal_pipe[1], &sigbyte, 1);
+  write (signal_pipe[1], &sigbyte, 1);
 
 #ifndef HAVE_SIGACTION
   signal (signum, take_signal);
--- libguile/srfi-13.c.orig	2011-09-24 23:47:26.917105515 +0100
+++ libguile/srfi-13.c	2011-09-24 23:55:55.121113145 +0100
@@ -513,6 +513,7 @@
   MY_VALIDATE_SUBSTRING_SPEC_COPY (1, str, cstr,
 				   2, start, cstart,
 				   3, end, cend);
+  cstr++;
   return scm_c_substring_copy (str, cstart, cend);
 }
 #undef FUNC_NAME
@@ -2402,6 +2403,7 @@
   MY_VALIDATE_SUBSTRING_SPEC_COPY (1, str, cstr,
 				   2, start, cstart,
 				   3, end, cend);
+  cstr++;
   return string_upcase_x (str, cstart, cend);
 }
 #undef FUNC_NAME
@@ -2423,6 +2425,7 @@
   MY_VALIDATE_SUBSTRING_SPEC_COPY (1, str, cstr,
 				   2, start, cstart,
 				   3, end, cend);
+  cstr++;
   return string_upcase_x (scm_string_copy (str), cstart, cend);
 }
 #undef FUNC_NAME
@@ -2470,6 +2473,7 @@
   MY_VALIDATE_SUBSTRING_SPEC_COPY (1, str, cstr,
 				   2, start, cstart,
 				   3, end, cend);
+  cstr++;
   return string_downcase_x (str, cstart, cend);
 }
 #undef FUNC_NAME
@@ -2491,6 +2495,7 @@
   MY_VALIDATE_SUBSTRING_SPEC_COPY (1, str, cstr,
 				   2, start, cstart,
 				   3, end, cend);
+  cstr++;
   return string_downcase_x (scm_string_copy (str), cstart, cend);
 }
 #undef FUNC_NAME
@@ -2547,6 +2552,7 @@
   MY_VALIDATE_SUBSTRING_SPEC_COPY (1, str, cstr,
 				   2, start, cstart,
 				   3, end, cend);
+  cstr++;
   return string_titlecase_x (str, cstart, cend);
 }
 #undef FUNC_NAME
@@ -2563,6 +2569,7 @@
   MY_VALIDATE_SUBSTRING_SPEC_COPY (1, str, cstr,
 				   2, start, cstart,
 				   3, end, cend);
+  cstr++;
   return string_titlecase_x (scm_string_copy (str), cstart, cend);
 }
 #undef FUNC_NAME
@@ -2633,6 +2640,7 @@
   MY_VALIDATE_SUBSTRING_SPEC_COPY (1, str, cstr,
 				   2, start, cstart,
 				   3, end, cend);
+  cstr++;
   result = scm_string_copy (str);
   ctarget = scm_i_string_writable_chars (result);
   string_reverse_x (ctarget, cstart, cend);
--- libguile/srfi-4.c.orig	2011-09-24 23:46:31.470104567 +0100
+++ libguile/srfi-4.c	2011-09-24 23:47:04.745105182 +0100
@@ -490,10 +490,10 @@
   scm_t_array_handle handle;
   size_t len;
   ssize_t i, inc;
-  const void *elts;
+/*   const void *elts; */
   SCM res = SCM_EOL;
 
-  elts = uvec_elements (type, uvec, &handle, &len, &inc);
+  uvec_elements (type, uvec, &handle, &len, &inc);
   for (i = len*inc; i > 0;)
     {
       i -= inc;
--- libguile/stacks.c.orig	2011-09-24 23:45:46.970104018 +0100
+++ libguile/stacks.c	2011-09-24 23:46:11.023104381 +0100
@@ -552,10 +552,10 @@
 	    "Return the @var{index}'th frame from @var{stack}.")
 #define FUNC_NAME s_scm_stack_ref
 {
-  unsigned long int c_index;
+/*   unsigned long int c_index; */
 
   SCM_VALIDATE_STACK (1, stack);
-  c_index = scm_to_unsigned_integer (index, 0, SCM_STACK_LENGTH(stack)-1);
+  scm_to_unsigned_integer (index, 0, SCM_STACK_LENGTH(stack)-1);
   return scm_cons (stack, index);
 }
 #undef FUNC_NAME
--- libguile/threads.c.orig	2011-09-24 23:56:28.468113647 +0100
+++ libguile/threads.c	2011-09-24 23:56:48.640113947 +0100
@@ -1455,9 +1455,9 @@
   if (res > 0 && FD_ISSET (wakeup_fd, readfds))
     {
       char dummy;
-      size_t count;
+/*       size_t count; */
 
-      count = read (wakeup_fd, &dummy, 1);
+      read (wakeup_fd, &dummy, 1);
 
       FD_CLR (wakeup_fd, readfds);
       res -= 1;
--- libguile/throw.c.orig	2011-09-24 23:57:00.927114131 +0100
+++ libguile/throw.c	2011-09-24 23:57:25.100114495 +0100
@@ -752,7 +752,7 @@
     {
       struct pre_unwind_data *c =
 	(struct pre_unwind_data *) SCM_CELL_WORD_1 (jmpbuf);
-      SCM handle, answer;
+      SCM handle;
 
       /* For old-style lazy-catch behaviour, we unwind the dynamic
 	 context before invoking the handler. */
@@ -776,7 +776,7 @@
 				  c,
 				  SCM_F_WIND_EXPLICITLY);
       scm_dynwind_unwind_handler (toggle_pre_unwind_running, c, 0);
-      answer = (c->handler) (c->handler_data, key, args);
+
 
       /* There is deliberately no scm_dynwind_end call here.  This
 	 means that the unwind handler (toggle_pre_unwind_running)
--- libguile/unif.c.orig	2011-09-24 23:57:38.377114702 +0100
+++ libguile/unif.c	2011-09-24 23:58:36.859115569 +0100
@@ -2676,7 +2676,7 @@
 scm_i_read_array (SCM port, int c)
 {
   ssize_t rank;
-  int got_rank;
+/*   int got_rank; */
   char tag[80];
   int tag_len;
 
@@ -2704,7 +2704,7 @@
 	  return SCM_BOOL_F;
 	}
       rank = 1;
-      got_rank = 1;
+/*       got_rank = 1; */
       tag[0] = 'f';
       tag_len = 1;
       goto continue_reading_tag;
--- libguile/async.c.orig	2011-10-20 18:53:47.181155002 -0400
+++ libguile/async.c	2011-10-20 18:55:11.550155579 -0400
@@ -240,7 +240,6 @@
 
   if (sleep_fd >= 0)
     {
-      size_t count;
       char dummy = 0;
 
       /* Likewise, T might already been done with sleeping here, but
@@ -248,7 +247,7 @@
 	 not yet have started sleeping, but this is no problem either
 	 since the data written to a pipe will not be lost, unlike a
 	 condition variable signal.  */
-      count = write (sleep_fd, &dummy, 1);
+      write (sleep_fd, &dummy, 1);
     }
 
   /* This is needed to protect sleep_mutex.
