From: Kostya Shishkov Date: Fri, 18 Jan 2019 09:19:31 +0000 (+0100) Subject: fix warnings X-Git-Url: https://git.nihav.org/?p=nihav.git;a=commitdiff_plain;h=674ebc332a586c1e8ca1050f2c23395d9f970ac0 fix warnings --- 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 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>, 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> { 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); } }; }