summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Matthias Schaefer <philipp.matthias.schaefer@posteo.de>2016-08-15 21:13:26 +0200
committerPhilipp Matthias Schaefer <philipp.matthias.schaefer@posteo.de>2016-08-15 21:13:26 +0200
commit51be2c98526d598fededbe96f130d482964a275f (patch)
tree8f328eaa8d38867e4b0e9774de9c5dec7c68bca8
parent5f963ad1cdcee84c29593a71fd79ed08f4bd8a4d (diff)
downloadnix-51be2c98526d598fededbe96f130d482964a275f.zip
Get rid of a few warnings during compilation of tests
-rw-r--r--test/test_mount.rs6
-rw-r--r--test/test_signalfd.rs3
2 files changed, 5 insertions, 4 deletions
diff --git a/test/test_mount.rs b/test/test_mount.rs
index 74d2938c..7ddbce9f 100644
--- a/test/test_mount.rs
+++ b/test/test_mount.rs
@@ -15,7 +15,7 @@ mod test_mount {
use std::os::unix::fs::PermissionsExt;
use std::process::{self, Command};
- use libc::{self, EACCES, EROFS};
+ use libc::{EACCES, EROFS};
use nix::mount::{mount, umount, MsFlags, MS_BIND, MS_RDONLY, MS_NOEXEC};
use nix::sched::{unshare, CLONE_NEWNS, CLONE_NEWUSER};
@@ -179,8 +179,8 @@ exit 23";
let mut handle = stderr.lock();
writeln!(handle,
"unshare failed: {}. Are unprivileged user namespaces available?",
- e);
- writeln!(handle, "mount is not being tested");
+ e).unwrap();
+ writeln!(handle, "mount is not being tested").unwrap();
// Exit with success because not all systems support unprivileged user namespaces, and
// that's not what we're testing for.
process::exit(0);
diff --git a/test/test_signalfd.rs b/test/test_signalfd.rs
index 8bb62bb2..28a6decb 100644
--- a/test/test_signalfd.rs
+++ b/test/test_signalfd.rs
@@ -1,9 +1,10 @@
extern crate nix;
#[cfg(feature = "signalfd")]
-
use nix::sys::signalfd::SignalFd;
+#[cfg(feature = "signalfd")]
use nix::sys::signal;
+#[cfg(feature = "signalfd")]
use nix::unistd;
#[cfg(feature = "signalfd")]