[前][次][番号順一覧][スレッド一覧]

ruby-changes:27393

From: kosaki <ko1@a...>
Date: Sun, 24 Feb 2013 09:17:38 +0900 (JST)
Subject: [ruby-changes:27393] kosaki:r39445 (trunk): * signal.c (sigsegv): suppress unused result warning. Because

kosaki	2013-02-24 09:17:29 +0900 (Sun, 24 Feb 2013)

  New Revision: 39445

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39445

  Log:
    * signal.c (sigsegv): suppress unused result warning. Because
      write(2) is marked __warn_unused_result__ on Linux glibc.

  Modified files:
    trunk/ChangeLog
    trunk/signal.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39444)
+++ ChangeLog	(revision 39445)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Feb 20 07:20:56 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* signal.c (sigsegv): suppress unused result warning. Because
+	  write(2) is marked __warn_unused_result__ on Linux glibc.
+
 Sun Feb 24 07:51:28 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* compile.c (iseq_set_arguments): no keyword check if any keyword rest
Index: signal.c
===================================================================
--- signal.c	(revision 39444)
+++ signal.c	(revision 39445)
@@ -658,8 +658,10 @@ static RETSIGTYPE https://github.com/ruby/ruby/blob/trunk/signal.c#L658
 sigsegv(int sig SIGINFO_ARG)
 {
     if (segv_received) {
+	int RB_UNUSED_VAR(err);
 	char msg[] = "SEGV received in SEGV handler\n";
-	write(2, msg, sizeof(msg));
+
+	err = write(2, msg, sizeof(msg));
 	ruby_abort();
     }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]