Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [OB] Fix linux-low.c build error
@ 2011-12-18 16:05 Hui Zhu
  2011-12-18 20:58 ` Jan Kratochvil
  0 siblings, 1 reply; 10+ messages in thread
From: Hui Zhu @ 2011-12-18 16:05 UTC (permalink / raw)
  To: gdb-patches ml

Got:
gcc -c  -g -O2    -I. -I../../../src/gdb/gdbserver
-I../../../src/gdb/gdbserver/../common
-I../../../src/gdb/gdbserver/../regformats
-I../../../src/gdb/gdbserver/../../include -Wall
-Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-char-subscripts -Werror ../../../src/gdb/gdbserver/linux-low.c
-DUSE_THREAD_DB
cc1: warnings being treated as errors
../../../src/gdb/gdbserver/linux-low.c: In function ‘linux_create_inferior’:
../../../src/gdb/gdbserver/linux-low.c:580:10: error: ignoring return
value of ‘write’, declared with attribute warn_unused_result

2011-12-18  Hui Zhu  <teawater@gmail.com>

	* linux-low.c (linux_create_inferior): Save return value to ret.
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -r1.185 -r1.186
--- src/gdb/gdbserver/linux-low.c	2011/12/16 19:06:37	1.185
+++ src/gdb/gdbserver/linux-low.c	2011/12/18 15:49:04	1.186
@@ -574,11 +574,12 @@
 	 Also, redirect stdin to /dev/null.  */
       if (remote_connection_is_stdio ())
 	{
+	  int ret;
 	  close (0);
 	  open ("/dev/null", O_RDONLY);
 	  dup2 (2, 1);
-	  write (2, "stdin/stdout redirected\n",
-		 sizeof ("stdin/stdout redirected\n") - 1);
+	  ret = write (2, "stdin/stdout redirected\n",
+		       sizeof ("stdin/stdout redirected\n") - 1);
 	}

       execv (program, allargs);


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

end of thread, other threads:[~2011-12-19 10:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-18 16:05 [OB] Fix linux-low.c build error Hui Zhu
2011-12-18 20:58 ` Jan Kratochvil
2011-12-18 22:55   ` [obv] Fix unused-but-set-variable error [Re: [OB] Fix linux-low.c build error] Jan Kratochvil
2011-12-19  3:22     ` Hui Zhu
2011-12-19  3:34     ` Joel Brobecker
2011-12-19  6:50     ` Yao Qi
2011-12-19  6:53       ` Joel Brobecker
2011-12-19  8:13         ` Yao Qi
2011-12-19  9:32           ` Joel Brobecker
2011-12-19 10:23       ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox