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] #![no_std]
#![feature(never_type)] #![feature(never_type)]
#![feature(naked_functions)] #![feature(naked_functions)]
#![feature(asm)] #![allow(unexpected_cfgs)]
extern crate crc; extern crate crc;
extern crate embedded_hal; extern crate embedded_hal;

View File

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

View File

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

View File

@ -15,9 +15,9 @@
// By design, this personality function is only ever called in the search phase, although // 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 // to keep things simple and close to upstream, it is not modified
use unwind as uw; 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() // Register ids were lifted from LLVM's TargetLowering::getExceptionPointerRegister()
// and TargetLowering::getExceptionSelectorRegister() for each architecture, // and TargetLowering::getExceptionSelectorRegister() for each architecture,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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