Merge branch 'fix_warnings' into 'main'
Fix warnings for updated rustc See merge request redox-os/base!273
This commit is contained in:
+2
-1
@@ -44,7 +44,8 @@ fn daemon(daemon: SchemeDaemon) -> anyhow::Result<()> {
|
||||
let mut sigaction = MaybeUninit::<libc::sigaction>::uninit();
|
||||
addr_of_mut!((*sigaction.as_mut_ptr()).sa_flags).write(0);
|
||||
libc::sigemptyset(addr_of_mut!((*sigaction.as_mut_ptr()).sa_mask));
|
||||
addr_of_mut!((*sigaction.as_mut_ptr()).sa_sigaction).write(sigusr_handler as usize);
|
||||
addr_of_mut!((*sigaction.as_mut_ptr()).sa_sigaction)
|
||||
.write(sigusr_handler as *const () as usize);
|
||||
sigaction.assume_init()
|
||||
};
|
||||
libredox::call::sigaction(flag::SIGUSR1, Some(&new_sigaction), None)?;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
#![allow(internal_features)]
|
||||
#![feature(core_intrinsics, str_from_raw_parts, never_type)]
|
||||
#![feature(abort_immediate, never_type)]
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
#[path = "aarch64.rs"]
|
||||
@@ -50,7 +49,7 @@ fn panic_handler(info: &core::panic::PanicInfo) -> ! {
|
||||
}
|
||||
|
||||
let _ = writeln!(&mut Writer, "{}", info);
|
||||
core::intrinsics::abort();
|
||||
core::process::abort_immediate();
|
||||
}
|
||||
|
||||
const HEAP_OFF: usize = arch::USERMODE_END / 2;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
#![feature(never_type)]
|
||||
|
||||
use std::io::{self, PipeWriter, Read, Write};
|
||||
use std::os::fd::{AsRawFd, FromRawFd, OwnedFd, RawFd};
|
||||
use std::os::fd::{AsRawFd, FromRawFd, RawFd};
|
||||
use std::os::unix::process::CommandExt;
|
||||
use std::process::Command;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ use common::io::Pio;
|
||||
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
|
||||
use common::io::Mmio;
|
||||
|
||||
use log::{debug, error, info, trace, warn};
|
||||
use log::{debug, error, trace, warn};
|
||||
|
||||
use std::fmt;
|
||||
|
||||
|
||||
@@ -41,17 +41,17 @@ impl HidDescriptor {
|
||||
let kind = bytes[1];
|
||||
|
||||
// A valid descriptor has at least one class descriptor
|
||||
if (length < Self::HID_DESC_FIXED_SIZE + Self::HID_CLASS_DESC_SIZE) {
|
||||
if length < Self::HID_DESC_FIXED_SIZE + Self::HID_CLASS_DESC_SIZE {
|
||||
return Err(anyhow!("Invalid length"));
|
||||
}
|
||||
|
||||
if (kind != HidClassType::HID as u8) {
|
||||
if kind != HidClassType::HID as u8 {
|
||||
return Err(anyhow!("This is not a hid descriptor"));
|
||||
}
|
||||
|
||||
let num_descriptors = bytes[5];
|
||||
|
||||
if (length != Self::HID_DESC_FIXED_SIZE + num_descriptors * Self::HID_CLASS_DESC_SIZE) {
|
||||
if length != Self::HID_DESC_FIXED_SIZE + num_descriptors * Self::HID_CLASS_DESC_SIZE {
|
||||
return Err(anyhow!(
|
||||
"Len doesn't match the given number of descriptors ({num_descriptors})"
|
||||
));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use anyhow::{Context, Result};
|
||||
use std::{env, thread, time};
|
||||
|
||||
use inputd::ProducerHandle;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(iter_next_chunk)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(non_exhaustive_omitted_patterns_lint)]
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// #![cfg_attr(target_arch = "aarch64", feature(stdsimd))] // Required for yield instruction
|
||||
|
||||
use std::io::{Read, Write};
|
||||
use std::os::fd::AsRawFd;
|
||||
use std::usize;
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
[toolchain]
|
||||
channel = "nightly-2025-10-03"
|
||||
channel = "nightly-2026-05-24"
|
||||
components = ["rust-src"]
|
||||
|
||||
Reference in New Issue
Block a user