Mark news as unsafe due to not being leak-safe.

This commit is contained in:
Dario Nieuwenhuis
2021-08-02 12:40:01 +02:00
parent af87031d62
commit 63ac7ac799
3 changed files with 64 additions and 62 deletions

View File

@ -135,10 +135,12 @@ fn main() -> ! {
let eth_int = interrupt_take!(ETH);
let mac_addr = [0x10; 6];
let state = STATE.put(State::new());
let eth = ETH.put(Ethernet::new(
state, p.ETH, eth_int, p.PA1, p.PA2, p.PC1, p.PA7, p.PC4, p.PC5, p.PB12, p.PB13, p.PB11,
LAN8742A, mac_addr, 1,
));
let eth = unsafe {
ETH.put(Ethernet::new(
state, p.ETH, eth_int, p.PA1, p.PA2, p.PC1, p.PA7, p.PC4, p.PC5, p.PB12, p.PB13,
p.PB11, LAN8742A, mac_addr, 1,
))
};
let config = StaticConfigurator::new(NetConfig {
address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 0, 61), 24),