From f9a32cdabc1680b89bd7b579dc1e3f8f18c28257 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 30 Jan 2014 16:55:20 -0800 Subject: std: Fixing all documentation * Stop referencing io_error * Start changing "Failure" sections to "Error" sections * Update all doc examples to work. --- src/libnative/io/timer_timerfd.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libnative/io/timer_timerfd.rs') 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) { 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) { // // 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) { -- cgit 1.4.1-3-g733a5