fix build warnings

And in Travis CI, treat warnings as error
to keep from merging codes with warning.

Fixes: #13

Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
bin liu
2020-09-23 15:43:05 +08:00
parent d18b3bac2f
commit 152af17f8f
20 changed files with 50 additions and 36 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ fn register_memory_event(
}
// write to file and set mode to 0700(FIXME)
fs::write(&event_control_path, data).map_err(|e| Error::with_cause(WriteFailed, e));
fs::write(&event_control_path, data).map_err(|e| Error::with_cause(WriteFailed, e))?;
let mut eventfd_file = unsafe { File::from_raw_fd(eventfd) };
@@ -71,7 +71,7 @@ fn register_memory_event(
loop {
let mut buf = [0; 8];
match eventfd_file.read(&mut buf) {
Err(err) => {
Err(_err) => {
return;
}
Ok(_) => {}