fix warnings
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 18 Jan 2019 09:19:31 +0000 (10:19 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 18 Jan 2019 09:19:31 +0000 (10:19 +0100)
nihav-commonfmt/src/demuxers/mod.rs
nihav-core/src/codecs/mod.rs
nihav-core/src/demuxers/mod.rs
nihav-game/src/demuxers/mod.rs

index fa388e3103409cd5b9dab33c51de0277a92a58f1..84d21f049f0839b72ea548f3d0e0204845901901 100644 (file)
@@ -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); } };
 }
index 76c683d0a9adae6cb7d0fd97fe9a2e37b7e42961..4edb2ee8aa97254e845bc96ad9087e7574d114e5 100644 (file)
@@ -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>>,
index bfd492ae966c763b16df55a37db28d857040b016..86de78de260044d8f03acaae512c523e13d85041 100644 (file)
@@ -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();
index f2aeb3b8e2a2a6cdb4d216103651fa17b1013956..8f9b384a03254fff4b2498bb63060e50c498e4b0 100644 (file)
@@ -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); } };
 }