diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-01-18 10:19:31 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-01-18 10:19:31 +0100 |
commit | 674ebc332a586c1e8ca1050f2c23395d9f970ac0 (patch) | |
tree | d2ab1a862ce81224655e699cfcaffb4d94fb068b | |
parent | 3167c45c8087a692192021e08a8063dff680001c (diff) | |
download | nihav-674ebc332a586c1e8ca1050f2c23395d9f970ac0.tar.gz |
fix warnings
-rw-r--r-- | nihav-commonfmt/src/demuxers/mod.rs | 1 | ||||
-rw-r--r-- | nihav-core/src/codecs/mod.rs | 5 | ||||
-rw-r--r-- | nihav-core/src/demuxers/mod.rs | 4 | ||||
-rw-r--r-- | nihav-game/src/demuxers/mod.rs | 1 |
4 files changed, 2 insertions, 9 deletions
diff --git a/nihav-commonfmt/src/demuxers/mod.rs b/nihav-commonfmt/src/demuxers/mod.rs index fa388e3..84d21f0 100644 --- a/nihav-commonfmt/src/demuxers/mod.rs +++ b/nihav-commonfmt/src/demuxers/mod.rs @@ -1,6 +1,7 @@ use nihav_core::demuxers::*; +#[allow(unused_macros)] macro_rules! validate { ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } }; } diff --git a/nihav-core/src/codecs/mod.rs b/nihav-core/src/codecs/mod.rs index 76c683d..4edb2ee 100644 --- a/nihav-core/src/codecs/mod.rs +++ b/nihav-core/src/codecs/mod.rs @@ -3,7 +3,6 @@ use std::ops::{Add, AddAssign, Sub, SubAssign}; use crate::frame::*; use std::rc::Rc; -use std::cell::RefCell; use std::mem; use crate::io::byteio::ByteIOError; use crate::io::bitreader::BitReaderError; @@ -45,10 +44,6 @@ impl From<AllocatorError> for DecoderError { fn from(_: AllocatorError) -> Self { DecoderError::AllocError } } -macro_rules! validate { - ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } }; -} - #[allow(dead_code)] pub struct HAMShuffler { lastframe: Option<NAVideoBuffer<u8>>, diff --git a/nihav-core/src/demuxers/mod.rs b/nihav-core/src/demuxers/mod.rs index bfd492a..86de78d 100644 --- a/nihav-core/src/demuxers/mod.rs +++ b/nihav-core/src/demuxers/mod.rs @@ -200,10 +200,6 @@ pub trait DemuxerCreator { fn get_name(&self) -> &'static str; } -macro_rules! validate { - ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } }; -} - pub fn create_demuxer<'a>(dmxcr: &DemuxerCreator, br: &'a mut ByteReader<'a>) -> DemuxerResult<Demuxer<'a>> { let mut dmx = dmxcr.new_demuxer(br); let mut str = StreamManager::new(); diff --git a/nihav-game/src/demuxers/mod.rs b/nihav-game/src/demuxers/mod.rs index f2aeb3b..8f9b384 100644 --- a/nihav-game/src/demuxers/mod.rs +++ b/nihav-game/src/demuxers/mod.rs @@ -1,5 +1,6 @@ use nihav_core::demuxers::*; +#[allow(unused_macros)] macro_rules! validate { ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } }; } |