diff -ur binutils-2.17-3+etch1/binutils/bucomm.c binutils-2.17/binutils/bucomm.c
--- binutils-2.17-3+etch1/binutils/bucomm.c	2006-03-13 23:27:22.000000000 +0100
+++ binutils-2.17/binutils/bucomm.c	2010-03-19 13:34:25.000000000 +0100
@@ -423,14 +423,14 @@
 #endif
       strcat (tmpname, "/");
       strcat (tmpname, template);
-      mktemp (tmpname);
+      tmpname = mktemp (tmpname);
       *slash = c;
     }
   else
     {
       tmpname = xmalloc (sizeof (template));
       strcpy (tmpname, template);
-      mktemp (tmpname);
+      tmpname = mktemp (tmpname);
     }
   return tmpname;
 }
diff -ur binutils-2.17-3+etch1/binutils/cxxfilt.c binutils-2.17/binutils/cxxfilt.c
--- binutils-2.17-3+etch1/binutils/cxxfilt.c	2005-11-17 17:58:27.000000000 +0100
+++ binutils-2.17/binutils/cxxfilt.c	2010-03-19 13:34:28.000000000 +0100
@@ -63,12 +63,12 @@
   result = cplus_demangle (mangled_name + skip_first, flags);
 
   if (result == NULL)
-    printf (mangled_name);
+    printf ("%s", mangled_name);
   else
     {
       if (mangled_name[0] == '.')
 	putchar ('.');
-      printf (result);
+      printf ("%s", result);
       free (result);
     }
 }
diff -ur binutils-2.17-3+etch1/binutils/readelf.c binutils-2.17/binutils/readelf.c
--- binutils-2.17-3+etch1/binutils/readelf.c	2006-03-10 18:20:28.000000000 +0100
+++ binutils-2.17/binutils/readelf.c	2010-03-19 13:34:32.000000000 +0100
@@ -3435,8 +3435,9 @@
 	    error (_("Unable to find program interpreter name\n"));
 	  else
 	    {
+              int ret;
 	      program_interpreter[0] = 0;
-	      fscanf (file, "%63s", program_interpreter);
+	      ret = fscanf (file, "%63s", program_interpreter);
 
 	      if (do_segments)
 		printf (_("\n      [Requesting program interpreter: %s]"),
diff -ur binutils-2.17-3+etch1/gas/app.c binutils-2.17/gas/app.c
--- binutils-2.17-3+etch1/gas/app.c	2006-03-10 11:57:18.000000000 +0100
+++ binutils-2.17/gas/app.c	2010-03-19 13:34:34.000000000 +0100
@@ -411,7 +411,7 @@
 
   /* This macro pushes a character back on the input stream.  */
 
-#define UNGET(uch) (*--from = (uch))
+#define UNGET(uch) do { if (from > input_buffer) *--from = (uch); } while(0)
 
   /* This macro puts a character into the output buffer.  If this
      character fills the output buffer, this macro jumps to the label
diff -ur binutils-2.17-3+etch1/gas/config/tc-m68k.c binutils-2.17/gas/config/tc-m68k.c
--- binutils-2.17-3+etch1/gas/config/tc-m68k.c	2006-06-02 04:16:34.000000000 +0200
+++ binutils-2.17/gas/config/tc-m68k.c	2010-03-19 13:34:36.000000000 +0100
@@ -7332,7 +7332,7 @@
     {
       if (i)
 	fprintf (stream, " | ");
-      fprintf (stream, m68k_archs[i].name);
+      fprintf (stream, "%s", m68k_archs[i].name);
     }
   fprintf (stream, "\n");
 
@@ -7341,7 +7341,7 @@
     {
       if (i)
 	fprintf (stream, " | ");
-      fprintf (stream, m68k_cpus[i].name);
+      fprintf (stream, "%s", m68k_cpus[i].name);
     }
   fprintf (stream, _("\n"));
 }
diff -ur binutils-2.17-3+etch1/gas/input-file.c binutils-2.17/gas/input-file.c
--- binutils-2.17-3+etch1/gas/input-file.c	2005-08-11 03:25:20.000000000 +0200
+++ binutils-2.17/gas/input-file.c	2010-03-19 13:34:38.000000000 +0100
@@ -166,7 +166,8 @@
       c = getc (f_in);
       if (c == 'N')
 	{
-	  fgets (buf, 80, f_in);
+	  char * c;
+          c = fgets (buf, 80, f_in);
 	  if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
 	    preprocess = 0;
 	  if (!strchr (buf, '\n'))
@@ -176,7 +177,8 @@
 	}
       else if (c == 'A')
 	{
-	  fgets (buf, 80, f_in);
+	  char * c;
+	  c = fgets (buf, 80, f_in);
 	  if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
 	    preprocess = 1;
 	  if (!strchr (buf, '\n'))
diff -ur binutils-2.17-3+etch1/gas/read.c binutils-2.17/gas/read.c
--- binutils-2.17-3+etch1/gas/read.c	2005-11-17 08:29:28.000000000 +0100
+++ binutils-2.17/gas/read.c	2010-03-19 13:34:40.000000000 +0100
@@ -5326,15 +5326,16 @@
       SKIP_WHITESPACE ();
       if (*input_line_pointer != ',')
 	{
+          int ret;
 	  if (default_prefix)
-	    asprintf (&label, "%s%s", default_prefix, name);
+	    ret = asprintf (&label, "%s%s", default_prefix, name);
 	  else
 	    {
 	      char leading_char = bfd_get_symbol_leading_char (stdoutput);
 	      /* Missing entry point, use function's name with the leading
 		 char prepended.  */
 	      if (leading_char)
-		asprintf (&label, "%c%s", leading_char, name);
+		ret = asprintf (&label, "%c%s", leading_char, name);
 	      else
 		label = name;
 	    }
diff -ur binutils-2.17-3+etch1/gas/stabs.c binutils-2.17/gas/stabs.c
--- binutils-2.17-3+etch1/gas/stabs.c	2005-08-11 03:25:20.000000000 +0200
+++ binutils-2.17/gas/stabs.c	2010-03-19 13:34:42.000000000 +0100
@@ -657,6 +657,7 @@
   char *buf;
   char *file;
   unsigned int lineno;
+  int ret;
 
   if (! void_emitted_p)
     {
@@ -666,7 +667,7 @@
     }
 
   as_where (&file, &lineno);
-  asprintf (&buf, "\"%s:F1\",%d,0,%d,%s",
+  ret = asprintf (&buf, "\"%s:F1\",%d,0,%d,%s",
 	    funcname, N_FUN, lineno + 1, startlabname);
   input_line_pointer = buf;
   s_stab ('s');
@@ -687,12 +688,13 @@
   char *hold = input_line_pointer;
   char *buf;
   char sym[30];
+  int ret;
 
   sprintf (sym, "%sendfunc%d", FAKE_LABEL_NAME, label_count);
   ++label_count;
   colon (sym);
 
-  asprintf (&buf, "\"\",%d,0,0,%s-%s", N_FUN, sym, startlabname);
+  ret = asprintf (&buf, "\"\",%d,0,0,%s-%s", N_FUN, sym, startlabname);
   input_line_pointer = buf;
   s_stab ('s');
   free (buf);
diff -ur binutils-2.17-3+etch1/opcodes/m68k-dis.c binutils-2.17/opcodes/m68k-dis.c
--- binutils-2.17-3+etch1/opcodes/m68k-dis.c	2006-06-02 04:16:36.000000000 +0200
+++ binutils-2.17/opcodes/m68k-dis.c	2010-03-19 13:34:45.000000000 +0100
@@ -590,7 +590,7 @@
       {
         static char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
         val = fetch_arg (buffer, place, 2, info);
-        (*info->fprintf_func) (info->stream, cacheFieldName[val]);
+        (*info->fprintf_func) (info->stream, "%s", cacheFieldName[val]);
         break;
       }
 
@@ -685,7 +685,7 @@
 	{
 	  static char *const scalefactor_name[] = { "<<", ">>" };
 	  val = fetch_arg (buffer, place, 1, info);
-	  (*info->fprintf_func) (info->stream, scalefactor_name[val]);
+	  (*info->fprintf_func) (info->stream, "%s", scalefactor_name[val]);
 	}
       else
 	{

