This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix compilation warning with UST enabled


I installed UST 0.11 and URCU 0.5.3 on my machine, and build gdbserver
with UST.  There is one warning on ignored return value of 'write', and
this simple patch is to fix this warning.

It is obvious, and I'll commit it later today.

-- 
Yao (éå)
gdb/gdbserver/

2011-12-12  Yao Qi  <yao@codesourcery.com>

	* tracepoint.c (gdb_ust_thread): Don't ignore return value
	of write.
---
 gdb/gdbserver/tracepoint.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index c595cb5..eab33cc 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -8121,7 +8121,8 @@ gdb_ust_thread (void *arg)
 		strcpy (cmd_buf, "");
 	    }
 
-	  write (fd, buf, 1);
+	  /* Fix compiler's warning: ignoring return value of 'write'.  */
+	  ret = write (fd, buf, 1);
 	  close (fd);
 	}
     }
-- 
1.7.0.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]