1
0
Fork 0

fix warnings

This commit is contained in:
Simon Renblad 2024-10-18 14:19:06 +08:00
parent ee03879620
commit 15f9d1a9e5
10 changed files with 12 additions and 12 deletions

View File

@ -1,7 +1,7 @@
#![no_std]
#![feature(never_type)]
#![feature(naked_functions)]
#![feature(asm)]
#![allow(unexpected_cfgs)]
extern crate crc;
extern crate embedded_hal;

View File

@ -1,3 +1,5 @@
#![allow(unexpected_cfgs)]
use std::{env,
fs::File,
io::{BufRead, BufReader, Write},

View File

@ -1,5 +1,6 @@
#![no_std]
#![feature(never_type)]
#![allow(unexpected_cfgs)]
#[cfg(feature = "alloc")]
extern crate alloc;

View File

@ -15,9 +15,9 @@
// By design, this personality function is only ever called in the search phase, although
// to keep things simple and close to upstream, it is not modified
use unwind as uw;
use libc::{c_int, uintptr_t};
use libc::c_int;
use dwarf::eh::{self, EHAction, EHContext};
use dwarf::eh::{EHAction, EHContext};
// Register ids were lifted from LLVM's TargetLowering::getExceptionPointerRegister()
// and TargetLowering::getExceptionSelectorRegister() for each architecture,

View File

@ -2,9 +2,8 @@
#![feature(c_variadic)]
#![feature(const_btree_len)]
#![feature(lang_items)]
#![feature(generic_const_exprs)]
#![feature(naked_functions)]
#![feature(asm)]
#![allow(unexpected_cfgs)]
#[macro_use]
extern crate alloc;

View File

@ -57,7 +57,6 @@ where
let ptr = storage as *mut u32;
let dest = core::slice::from_raw_parts_mut(ptr as *mut u8, length * 4);
reader.read_exact(dest)?;
drop(dest);
let dest = core::slice::from_raw_parts_mut(ptr, length);
NativeEndian::from_slice_u32(dest);
}
@ -65,7 +64,6 @@ where
let ptr = storage as *mut u64;
let dest = core::slice::from_raw_parts_mut(ptr as *mut u8, length * 8);
reader.read_exact(dest)?;
drop(dest);
let dest = core::slice::from_raw_parts_mut(ptr, length);
NativeEndian::from_slice_u64(dest);
}

View File

@ -1,3 +1,4 @@
#![allow(unexpected_cfgs)]
extern crate build_zynq;
fn main() {

View File

@ -1,9 +1,9 @@
#![no_std]
#![no_main]
#![recursion_limit = "1024"] // for futures_util::select!
#![allow(unexpected_cfgs)]
#![feature(alloc_error_handler)]
#![feature(const_btree_new)]
#![feature(panic_info_message)]
#![feature(const_btree_len)]
#[macro_use]
extern crate alloc;

View File

@ -38,7 +38,6 @@ where
let ptr = storage as *mut u32;
let dest = core::slice::from_raw_parts_mut(ptr as *mut u8, length * 4);
proto_async::read_chunk(stream, dest).await?;
drop(dest);
let dest = core::slice::from_raw_parts_mut(ptr, length);
NativeEndian::from_slice_u32(dest);
}
@ -46,7 +45,6 @@ where
let ptr = storage as *mut u64;
let dest = core::slice::from_raw_parts_mut(ptr as *mut u8, length * 8);
proto_async::read_chunk(stream, dest).await?;
drop(dest);
let dest = core::slice::from_raw_parts_mut(ptr, length);
NativeEndian::from_slice_u64(dest);
}

View File

@ -1,6 +1,7 @@
#![no_std]
#![no_main]
#![feature(alloc_error_handler, never_type)]
#![allow(unexpected_cfgs)]
#[macro_use]
extern crate log;
@ -1457,7 +1458,7 @@ pub fn panic_fmt(info: &core::panic::PanicInfo) -> ! {
} else {
print!("unknown location");
}
if let Some(message) = info.message() {
if let Some(message) = info.message().as_str() {
println!(": {}", message);
} else {
println!("");