diff --git a/src/ether.rs b/src/ether.rs index 55088ea..ab61616 100644 --- a/src/ether.rs +++ b/src/ether.rs @@ -6,6 +6,7 @@ const ETH_P_8021Q : u16 = 0x8100; type MacAddr = [u8; ETH_ALEN]; +#[allow(non_snake_case)] #[repr(C)] #[packed] struct vlan_ethhdr { diff --git a/src/ip.rs b/src/ip.rs index e7c0b3b..13e9e3a 100644 --- a/src/ip.rs +++ b/src/ip.rs @@ -16,6 +16,7 @@ struct iphdr { daddr: u32 } +#[allow(dead_code)] pub struct V4Packet<'a> { header: &'a iphdr, payload: &'a [u8] diff --git a/src/main.rs b/src/main.rs index 38ecd4d..c515fd5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,6 @@ use std::sync::{Arc, RwLock}; use std::sync::atomic::{AtomicUsize, Ordering}; use bounded_spsc_queue::Producer; -use rustc_serialize::json; use rustc_serialize::json::{Json, ToJson}; mod util; @@ -59,6 +58,7 @@ struct Writer { queue: Producer } +#[allow(unused_variables)] fn main() { let mut args = env::args(); args.next(); // shift off program name