public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [patch] Fix compilation warning with UST enabled
@ 2011-12-13  2:12 Yao Qi
  2011-12-14 10:25 ` [committed] " Yao Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Yao Qi @ 2011-12-13  2:12 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

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 (齐尧)

[-- Attachment #2: 0002-Don-t-ignore-return-value.patch --]
[-- Type: text/x-patch, Size: 637 bytes --]

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [committed] [patch] Fix compilation warning with UST enabled
  2011-12-13  2:12 [patch] Fix compilation warning with UST enabled Yao Qi
@ 2011-12-14 10:25 ` Yao Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Yao Qi @ 2011-12-14 10:25 UTC (permalink / raw)
  To: gdb-patches

On 12/13/2011 10:03 AM, Yao Qi wrote:
> It is obvious, and I'll commit it later today.
> 
> 
> gdb/gdbserver/
> 
> 2011-12-12  Yao Qi  <yao@codesourcery.com>
> 
> 	* tracepoint.c (gdb_ust_thread): Don't ignore return value
> 	of write.

Committed to trunk.
http://sourceware.org/ml/gdb-cvs/2011-12/msg00120.html

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-14  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-13  2:12 [patch] Fix compilation warning with UST enabled Yao Qi
2011-12-14 10:25 ` [committed] " Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).