gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 17 Jul 2011 19:22:32 +0000 (19:22 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 17 Jul 2011 19:22:32 +0000 (19:22 +0000)
* remote-mips.c (pmon_download): Fix ignored return value GCC warning.

gdb/ChangeLog
gdb/remote-mips.c

index b5bb85892273c9d754e3329a746b59bf48a361c1..565fba7d63943811209cdcc0a67e1295e8dbbf06 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * remote-mips.c (pmon_download): Fix ignored return value GCC warning.
+
 2011-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Code cleanup.
index 7fbe76752175425a0f663c69c1c2c1dcdc23df90..d544bcb6b474c8dcbb48b515c24268615d47bd00 100644 (file)
@@ -3343,7 +3343,13 @@ static void
 pmon_download (char *buffer, int length)
 {
   if (tftp_in_use)
-    fwrite (buffer, 1, length, tftp_file);
+    {
+      size_t written;
+
+      written = fwrite (buffer, 1, length, tftp_file);
+      if (written < length)
+       perror_with_name (tftp_localname);
+    }
   else
     serial_write (udp_in_use ? udp_desc : mips_desc, buffer, length);
 }