From 712c65750bca1cae85b9a95e5d7d3f4f75d7c492 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Wed, 14 Dec 2011 07:47:15 +0000 Subject: [PATCH] gdb/gdbserver/ * tracepoint.c (gdb_ust_thread): Don't ignore return value of write. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/tracepoint.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 8c880634afb..d2951605da6 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2011-12-14 Yao Qi + + * tracepoint.c (gdb_ust_thread): Don't ignore return value + of write. + 2011-12-14 Yao Qi * i386-low.c (i386_low_stopped_data_address): Initialize local diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index d50b5f38bda..5f7177f2d07 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -8122,7 +8122,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); } } -- 2.30.2