summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-10-15 21:52:55 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-10-15 21:52:55 +0000
commit5e077ccc96c7b46eb1d852330d3cec49efbac91e (patch)
treeb05db16d1b05499bfa291ebe3eb935b85b6583d4
parent175be511693dd395e4f0c3a14cf69ef19a482cf2 (diff)
parent682bd37b48c6a9edc77a9420082ac6b3fdb4d6e6 (diff)
downloadnix-5e077ccc96c7b46eb1d852330d3cec49efbac91e.zip
Merge #953
953: Eliminate compiler warnings, especially on non-Linux platforms r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
-rw-r--r--test/sys/test_ptrace.rs1
-rw-r--r--test/test_mount.rs1
-rw-r--r--test/test_stat.rs2
3 files changed, 3 insertions, 1 deletions
diff --git a/test/sys/test_ptrace.rs b/test/sys/test_ptrace.rs
index debc4517..a15a7921 100644
--- a/test/sys/test_ptrace.rs
+++ b/test/sys/test_ptrace.rs
@@ -3,6 +3,7 @@ use nix::errno::Errno;
use nix::unistd::getpid;
use nix::sys::ptrace::{self, Options};
+#[cfg(any(target_os = "android", target_os = "linux"))]
use std::mem;
#[test]
diff --git a/test/test_mount.rs b/test/test_mount.rs
index 2e4f19cc..d2e08bc4 100644
--- a/test/test_mount.rs
+++ b/test/test_mount.rs
@@ -206,6 +206,7 @@ exit 23";
// Test runner
/// Mimic normal test output (hackishly).
+#[cfg(target_os = "linux")]
macro_rules! run_tests {
( $($test_fn:ident),* ) => {{
println!();
diff --git a/test/test_stat.rs b/test/test_stat.rs
index e72dffd3..01d86a79 100644
--- a/test/test_stat.rs
+++ b/test/test_stat.rs
@@ -174,7 +174,7 @@ fn test_utimes() {
let fullpath = tempdir.path().join("file");
drop(File::create(&fullpath).unwrap());
- utimes(&fullpath, &TimeVal::seconds(9990), &TimeVal::seconds(5550));
+ utimes(&fullpath, &TimeVal::seconds(9990), &TimeVal::seconds(5550)).unwrap();
assert_times_eq(9990, 5550, &fs::metadata(&fullpath).unwrap());
}