summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-05-22 11:23:39 +0100
committerAndrew Walbran <qwandor@google.com>2023-05-22 11:23:39 +0100
commitaef996a454467f188348447707e8e7598b6c4e98 (patch)
treee32d7c3c87943bde5d6bdd96d82bc240522c7d49
parent1a89311dd5dde148d70709ce49913a283f46b39f (diff)
downloadnix-aef996a454467f188348447707e8e7598b6c4e98.zip
Fix warnings.
-rw-r--r--src/sys/event.rs6
-rw-r--r--test/sys/test_socket.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/sys/event.rs b/src/sys/event.rs
index 5dcf121a..ec7f7e27 100644
--- a/src/sys/event.rs
+++ b/src/sys/event.rs
@@ -71,7 +71,7 @@ impl Kqueue {
timeout as *const timespec
} else {
ptr::null()
- }
+ },
)
};
Errno::result(res).map(|r| r as usize)
@@ -86,7 +86,7 @@ impl Kqueue {
target_os = "openbsd"
))]
type type_of_udata = *mut libc::c_void;
-#[cfg(any(target_os = "netbsd"))]
+#[cfg(target_os = "netbsd")]
type type_of_udata = intptr_t;
#[cfg(target_os = "netbsd")]
@@ -171,7 +171,7 @@ libc_enum! {
))]
#[doc(hidden)]
pub type type_of_event_flag = u16;
-#[cfg(any(target_os = "netbsd"))]
+#[cfg(target_os = "netbsd")]
#[doc(hidden)]
pub type type_of_event_flag = u32;
libc_bitflags! {
diff --git a/test/sys/test_socket.rs b/test/sys/test_socket.rs
index 0a8d0544..9fb7e89a 100644
--- a/test/sys/test_socket.rs
+++ b/test/sys/test_socket.rs
@@ -10,7 +10,7 @@ use std::path::Path;
use std::slice;
use std::str::FromStr;
-#[cfg(any(target_os = "linux"))]
+#[cfg(target_os = "linux")]
#[cfg_attr(qemu, ignore)]
#[test]
pub fn test_timestamping() {
@@ -2082,7 +2082,7 @@ pub fn test_vsock() {
// Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
// of QEMU support is suspected.
#[cfg_attr(qemu, ignore)]
-#[cfg(all(target_os = "linux"))]
+#[cfg(target_os = "linux")]
#[test]
fn test_recvmsg_timestampns() {
use nix::sys::socket::*;
@@ -2137,7 +2137,7 @@ fn test_recvmsg_timestampns() {
// Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
// of QEMU support is suspected.
#[cfg_attr(qemu, ignore)]
-#[cfg(all(target_os = "linux"))]
+#[cfg(target_os = "linux")]
#[test]
fn test_recvmmsg_timestampns() {
use nix::sys::socket::*;