You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2010/01/13 21:01:14 UTC

svn commit: r898924 - in /incubator/trafficserver/traffic/branches/dev/iocore: eventsystem/UnixEThread.cc net/UnixNet.cc

Author: jplevyak
Date: Wed Jan 13 20:01:13 2010
New Revision: 898924

URL: http://svn.apache.org/viewvc?rev=898924&view=rev
Log:
fix compilation issue: warning from unused return value not ignored

Modified:
    incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/UnixEThread.cc
    incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc

Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/UnixEThread.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/UnixEThread.cc?rev=898924&r1=898923&r2=898924&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/UnixEThread.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/UnixEThread.cc Wed Jan 13 20:01:13 2010
@@ -65,16 +65,16 @@
   memset((char *) ethreads_to_be_signalled, 0, MAX_EVENT_THREADS * sizeof(EThread *));
   memset(thread_private, 0, PER_THREAD_DATA);
 #ifdef HAVE_EVENTFD
-  evfd = eventfd(0, O_NONBLOCK | O_CLOEXEC);
+  evfd = eventfd(0, O_NONBLOCK | FD_CLOEXEC);
   if (evfd < 0)
     ink_release_assert((evfd = eventfd(0,0)) >= 0);
-  fcntl(evfd, F_SETFD, O_CLOEXEC);
+  fcntl(evfd, F_SETFD, FD_CLOEXEC);
   fcntl(evfd, F_SETFL, O_NONBLOCK);
 #else
   ink_release_assert(pipe(evpipe) >= 0); 
-  fcntl(evpipe[0], F_SETFD, O_CLOEXEC);
+  fcntl(evpipe[0], F_SETFD, FD_CLOEXEC);
   fcntl(evpipe[0], F_SETFL, O_NONBLOCK);
-  fcntl(evpipe[1], F_SETFD, O_CLOEXEC);
+  fcntl(evpipe[1], F_SETFD, FD_CLOEXEC);
   fcntl(evpipe[1], F_SETFL, O_NONBLOCK);
 #endif
 }

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc?rev=898924&r1=898923&r2=898924&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc Wed Jan 13 20:01:13 2010
@@ -141,10 +141,10 @@
 net_signal_hook_callback(EThread *thread) {
 #if HAVE_EVENTFD
   inku64 counter;
-  read(thread->evfd, &counter, sizeof(inku64));
+  (void)read(thread->evfd, &counter, sizeof(inku64));
 #else
   char dummy;
-  read(thread->evpipe[0], &dummy, 1);
+  (void)read(thread->evpipe[0], &dummy, 1);
 #endif  
 }
 
@@ -152,10 +152,10 @@
 net_signal_hook_function(EThread *thread) {
 #if HAVE_EVENTFD
   inku64 counter = 1;
-  write(thread->evfd, &counter, sizeof(inku64));
+  (void)write(thread->evfd, &counter, sizeof(inku64));
 #else
   char dummy;
-  write(thread->evpipe[0], &dummy, 1);
+  (void)write(thread->evpipe[0], &dummy, 1);
 #endif  
 }