Building for ARMv6, silenced unknown lints

This commit is contained in:
Dennis Schwerdel 2016-06-21 11:37:26 +02:00
parent bebfc07ecd
commit e31e5c362d
6 changed files with 12 additions and 1 deletions

5
.cargo/config Normal file
View File

@ -0,0 +1,5 @@
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

View File

@ -23,7 +23,7 @@ fn main() {
if target.ends_with("-musl") {
args.extend(vec!["CC=musl-gcc"]);
}
if target == "armv7-unknown-linux-gnueabihf" {
if target == "arm-unknown-linux-gnueabihf" || target == "armv7-unknown-linux-gnueabihf" {
args.extend(vec!["CC=arm-linux-gnueabihf-gcc"]);
}
Command::new("sh").args(&args).current_dir(&libsodium_dir).status().unwrap();

View File

@ -174,6 +174,7 @@ pub struct GenericCloud<P: Protocol> {
}
impl<P: Protocol> GenericCloud<P> {
#[allow(unknown_lints)]
#[allow(too_many_arguments)]
pub fn new(device: Device, listen: u16, network_id: Option<NetworkId>, table: Box<Table>,
peer_timeout: Duration, learning: bool, broadcast: bool, addresses: Vec<Range>,
@ -440,6 +441,7 @@ impl<P: Protocol> GenericCloud<P> {
Ok(())
}
#[allow(unknown_lints)]
#[allow(cyclomatic_complexity)]
pub fn run(&mut self) {
let dummy_time = Instant::now();

View File

@ -184,6 +184,7 @@ impl Crypto {
}
}
#[allow(unknown_lints)]
#[allow(match_same_arms)]
pub fn additional_bytes(&self) -> usize {
match *self {

View File

@ -108,6 +108,7 @@ impl fmt::Debug for Address {
impl FromStr for Address {
type Err=Error;
#[allow(unknown_lints)]
#[allow(needless_range_loop)]
fn from_str(text: &str) -> Result<Self, Self::Err> {
if let Ok(addr) = Ipv4Addr::from_str(text) {

View File

@ -94,6 +94,7 @@ impl<'a> fmt::Debug for Message<'a> {
}
}
#[allow(unknown_lints)]
#[allow(needless_range_loop)]
pub fn decode<'a>(data: &'a mut [u8], crypto: &mut Crypto) -> Result<(Options, Message<'a>), Error> {
let mut end = data.len();
@ -194,6 +195,7 @@ pub fn decode<'a>(data: &'a mut [u8], crypto: &mut Crypto) -> Result<(Options, M
Ok((options, msg))
}
#[allow(unknown_lints)]
#[allow(needless_range_loop)]
pub fn encode<'a>(options: &Options, msg: &'a mut Message, mut buf: &'a mut [u8], crypto: &mut Crypto) -> &'a mut [u8] {
let mut start = 64;