From d2ae344799fb4377092964e674fb4f01c25b3756 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 7 Jan 2019 23:13:44 -0500 Subject: [PATCH] Fix dead_code warnings in fuzztarget builds --- src/util/byte_utils.rs | 2 ++ src/util/mod.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/util/byte_utils.rs b/src/util/byte_utils.rs index 7230a4e1c..44445666f 100644 --- a/src/util/byte_utils.rs +++ b/src/util/byte_utils.rs @@ -10,6 +10,7 @@ pub fn slice_to_be32(v: &[u8]) -> u32 { ((v[2] as u32) << 8*1) | ((v[3] as u32) << 8*0) } +#[cfg(not(feature = "fuzztarget"))] // Used only by poly1305 #[inline] pub fn slice_to_le32(v: &[u8]) -> u32 { ((v[0] as u32) << 8*0) | @@ -54,6 +55,7 @@ pub fn be32_to_array(u: u32) -> [u8; 4] { v[3] = ((u >> 8*0) & 0xff) as u8; v } +#[cfg(not(feature = "fuzztarget"))] // Used only by poly1305 #[inline] pub fn le32_to_array(u: u32) -> [u8; 4] { let mut v = [0; 4]; diff --git a/src/util/mod.rs b/src/util/mod.rs index 1a6eb8049..c1b6c2300 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -6,6 +6,7 @@ pub mod ser; pub(crate) mod byte_utils; pub(crate) mod chacha20; +#[cfg(not(feature = "fuzztarget"))] pub(crate) mod poly1305; pub(crate) mod chacha20poly1305rfc; pub(crate) mod internal_traits; -- 2.39.5