Commit 4177fe6b authored by RILLING Louis's avatar RILLING Louis
Browse files

fake-vm: Fix warnings

parent b6fed293
Pipeline #137370 passed with stages
in 4 minutes and 6 seconds
......@@ -10,7 +10,7 @@ use static_assertions::const_assert;
use std::os::raw::{c_char, c_int};
unsafe fn parse_os_args<F, T>(argc: c_int, argv: *const *const c_char, parse: F) -> Result<(T, c_int)>
where F: FnOnce(&mut Iterator<Item = std::borrow::Cow<'static, std::ffi::OsStr>>) -> Result<T>
where F: FnOnce(&mut dyn Iterator<Item = std::borrow::Cow<'static, std::ffi::OsStr>>) -> Result<T>
{
use std::os::unix::ffi::OsStrExt;
......
......@@ -240,15 +240,15 @@ impl Context {
send_time
};
if let Err(e) = connector.send(MsgOut::SendPacket(send_time, src, dest, payload)) {
// error!("send(SendPacket) failed: {}", e);
if let Err(_e) = connector.send(MsgOut::SendPacket(send_time, src, dest, payload)) {
// error!("send(SendPacket) failed: {}", _e);
return AfterDeadline::EndSimulation;
}
}
// Second, notify that we reached the deadline
if let Err(e) = connector.send(MsgOut::AtDeadline) {
// error!("send(AtDeadline) failed: {}", e);
if let Err(_e) = connector.send(MsgOut::AtDeadline) {
// error!("send(AtDeadline) failed: {}", _e);
return AfterDeadline::EndSimulation;
}
......@@ -262,8 +262,8 @@ impl Context {
Ok(msg) => if let Some(after_deadline) = self.handle_actor_msg(msg) {
break after_deadline;
},
Err(e) => {
// error!("recv failed: {}", e);
Err(_e) => {
// error!("recv failed: {}", _e);
break AfterDeadline::EndSimulation;
}
}
......@@ -452,7 +452,7 @@ pub mod test_helpers {
}
}
static INIT: std::sync::Once = std::sync::ONCE_INIT;
static INIT: std::sync::Once = std::sync::Once::new();
pub fn init() {
// Cargo test runs all tests in a same process so don't confuse log by setting a logger
......
......@@ -60,6 +60,7 @@ impl<I: std::fmt::Debug> WaitfreeArrayQueue<I> {
self.queue.pop().ok()
}
#[allow(dead_code)]
pub fn iter<'a>(&'a self) -> WaitfreeArrayQueueIter<'a, I> {
WaitfreeArrayQueueIter {
queue: self,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment