From 2e424e08c156520e2592dfcaed386c00157d6d77 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 17 Jul 2011 19:22:32 +0000 Subject: [PATCH] gdb/ * remote-mips.c (pmon_download): Fix ignored return value GCC warning. --- gdb/ChangeLog | 4 ++++ gdb/remote-mips.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b5bb8589227..565fba7d639 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-07-17 Jan Kratochvil + + * remote-mips.c (pmon_download): Fix ignored return value GCC warning. + 2011-07-15 Jan Kratochvil Code cleanup. diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 7fbe7675217..d544bcb6b47 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -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); } -- 2.30.2