about summary refs log tree commit diff
path: root/src/libnative/io/timer_timerfd.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-01-30 16:55:20 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-03 09:32:35 -0800
commitf9a32cdabc1680b89bd7b579dc1e3f8f18c28257 (patch)
treeeb30082c0b18bd9510a805e9d416d69242652d3a /src/libnative/io/timer_timerfd.rs
parent2a7c5e0b724d8318a7e7762e483c225e8a7420a1 (diff)
downloadrust-f9a32cdabc1680b89bd7b579dc1e3f8f18c28257.tar.gz
rust-f9a32cdabc1680b89bd7b579dc1e3f8f18c28257.zip
std: Fixing all documentation
* Stop referencing io_error
* Start changing "Failure" sections to "Error" sections
* Update all doc examples to work.
Diffstat (limited to 'src/libnative/io/timer_timerfd.rs')
-rw-r--r--src/libnative/io/timer_timerfd.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libnative/io/timer_timerfd.rs b/src/libnative/io/timer_timerfd.rs
index ca20314997e..7c22e90bbff 100644
--- a/src/libnative/io/timer_timerfd.rs
+++ b/src/libnative/io/timer_timerfd.rs
@@ -96,7 +96,7 @@ fn helper(input: libc::c_int, messages: Port<Req>) {
             if fd == input {
                 let mut buf = [0, ..1];
                 // drain the input file descriptor of its input
-                FileDesc::new(fd, false).inner_read(buf).unwrap();
+                let _ = FileDesc::new(fd, false).inner_read(buf).unwrap();
                 incoming = true;
             } else {
                 let mut bits = [0, ..8];
@@ -104,7 +104,7 @@ fn helper(input: libc::c_int, messages: Port<Req>) {
                 //
                 // FIXME: should this perform a send() this number of
                 //      times?
-                FileDesc::new(fd, false).inner_read(bits).unwrap();
+                let _ = FileDesc::new(fd, false).inner_read(bits).unwrap();
                 let remove = {
                     match map.find(&fd).expect("fd unregistered") {
                         &(ref c, oneshot) => !c.try_send(()) || oneshot
@@ -166,7 +166,8 @@ impl Timer {
     }
 
     pub fn sleep(ms: u64) {
-        unsafe { libc::usleep((ms * 1000) as libc::c_uint); }
+        // FIXME: this can fail because of EINTR, what do do?
+        let _ = unsafe { libc::usleep((ms * 1000) as libc::c_uint) };
     }
 
     fn remove(&mut self) {