Deny deny-unsafe_op_in_unsafe_fn on the crate level
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
//! Nul-terminated byte strings.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{marker::PhantomData, ptr::NonNull, str::Utf8Error};
|
||||
|
||||
use alloc::{
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! Equivalent of Rust's `Vec<T>`, but using relibc's own allocator.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
io::{self, Write},
|
||||
platform::{self, WriteByte, types::*},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/arpa_inet.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
ptr, slice,
|
||||
str::{self, FromStr},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/assert.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
c_str::CStr,
|
||||
platform::types::{c_char, c_int},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/crypt.3.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use ::scrypt::password_hash::{Salt, SaltString};
|
||||
use alloc::{
|
||||
ffi::CString,
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/ctype.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
// TODO: *_l functions
|
||||
|
||||
use crate::platform::types::c_int;
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/dirent.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{boxed::Box, vec::Vec};
|
||||
use core::{mem, ptr, slice};
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! dl-tls implementation for Redox
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
// FIXME(andypython): remove this when #![allow(warnings, unused_variables)] is
|
||||
// dropped from src/lib.rs.
|
||||
#![warn(warnings, unused_variables)]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/dlfcn.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
// FIXME(andypython): remove this when #![allow(warnings, unused_variables)] is
|
||||
// dropped from src/lib.rs.
|
||||
#![warn(warnings, unused_variables)]
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::platform::{
|
||||
self,
|
||||
types::{c_char, c_int},
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fcntl.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::num::NonZeroU64;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/float.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::_fenv::{FE_TONEAREST, fegetround},
|
||||
platform::types::c_int,
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fnmatch.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{borrow::Cow, vec::Vec};
|
||||
use core::slice;
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::{
|
||||
stdio, string,
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/glob.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::ptr;
|
||||
|
||||
use alloc::{boxed::Box, vec::Vec};
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/grp.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
cell::SyncUnsafeCell,
|
||||
convert::{TryFrom, TryInto},
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! `ifaddrs.h` implementation
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::ptr;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/inttypes.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::{ctype, errno::*, stdlib::*},
|
||||
platform::{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/libgen.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::platform::types::c_char;
|
||||
|
||||
use crate::header::string::strlen;
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/locale.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{boxed::Box, ffi::CString, string::String};
|
||||
use core::{ptr, str::FromStr};
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! Non-POSIX, see <https://man7.org/linux/man-pages/man3/posix_memalign.3.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::errno::ENOMEM,
|
||||
platform::{
|
||||
|
||||
@@ -13,7 +13,6 @@ use libm::{fabs, floor, pow, round, trunc};
|
||||
extern crate alloc;
|
||||
|
||||
mod strfmon;
|
||||
#[deny(unsafe_op_in_unsafe_fn)]
|
||||
#[repr(C)]
|
||||
struct LocaleMonetaryInfo {
|
||||
int_curr_symbol: &'static str,
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/net_if.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::ptr::null;
|
||||
|
||||
use alloc::ffi::CString;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{boxed::Box, str::SplitWhitespace, vec::Vec};
|
||||
use core::{mem, ptr};
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netdb.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
mod dns;
|
||||
|
||||
use core::{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/poll.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{mem, ptr, slice};
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{ptr, sync::atomic::Ordering};
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::header::errno::*;
|
||||
|
||||
use core::num::NonZeroU32;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
// Used design from https://www.remlab.net/op/futex-condvar.shtml
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::header::time::CLOCK_REALTIME;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/pthread.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::collections::LinkedList;
|
||||
use core::{cell::Cell, ptr::NonNull};
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use super::*;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use super::*;
|
||||
|
||||
// PTHREAD_ONCE_INIT
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use super::*;
|
||||
|
||||
use crate::header::errno::EBUSY;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::sync::atomic::{AtomicI32 as AtomicInt, Ordering};
|
||||
|
||||
use crate::header::errno::EBUSY;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use super::*;
|
||||
|
||||
// TODO: Hashmap?
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::{fcntl, sys_ioctl, unistd},
|
||||
io::{Cursor, Write},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/openpty.3.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{mem, ptr, slice};
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/pwd.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{boxed::Box, vec::Vec};
|
||||
use core::{
|
||||
ops::{Deref, DerefMut},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/regex.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::string::strlen,
|
||||
platform::types::{c_char, c_int, c_void, size_t},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/semaphore.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::time::{CLOCK_MONOTONIC, CLOCK_REALTIME, timespec},
|
||||
platform::types::{c_char, c_int, c_long, c_uint, clockid_t},
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
cell::SyncUnsafeCell,
|
||||
convert::TryInto,
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/signal.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{arch::global_asm, mem, ptr};
|
||||
|
||||
use cbitset::BitSet;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/getline.html
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{string::String, vec::Vec};
|
||||
use core::{fmt::Write, intrinsics::unlikely, ops::Deref, ptr};
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/stdio.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{
|
||||
borrow::{Borrow, BorrowMut},
|
||||
boxed::Box,
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
// TODO: reuse more code with the wide printf impl
|
||||
use crate::{
|
||||
c_str::{self, CStr, NulStr},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/stdlib.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{convert::TryFrom, intrinsics, iter, mem, ptr, slice};
|
||||
use rand::{
|
||||
Rng, SeedableRng,
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
//! Helper functions for random() and friends, see https://pubs.opengroup.org/onlinepubs/7908799/xsh/initstate.html
|
||||
// Ported from musl's implementation (src/prng/random.c)
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
platform::types::c_uint,
|
||||
sync::{Mutex, MutexGuard},
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::platform::types::{c_char, c_int, c_void, size_t};
|
||||
|
||||
pub unsafe fn introsort(
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/strings.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
arch,
|
||||
iter::{once, zip},
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! sys/epoll.h implementation for Redox, following http://man7.org/linux/man-pages/man7/epoll.7.html
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::ptr;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
error::ResultExt,
|
||||
platform::{Sys, types::*},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_mman.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
c_str::{CStr, CString},
|
||||
error::{Errno, ResultExt},
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! ptrace compatibility layer for Redox OS
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
error::ResultExt,
|
||||
platform::{PalPtrace, Sys, types::*},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! Non-POSIX, see <https://www.man7.org/linux/man-pages/man2/getrandom.2.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::slice;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_resource.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
error::ResultExt,
|
||||
header::sys_time::timeval,
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_select.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::mem;
|
||||
|
||||
use cbitset::BitSet;
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{mem, ptr};
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_statvfs.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
c_str::CStr,
|
||||
error::ResultExt,
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
|
||||
// Exported as both syslog.h and sys/syslog.h.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
#[cfg(target_os = "redox")]
|
||||
#[path = "redox.rs"]
|
||||
pub mod sys;
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_time.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
c_str::CStr,
|
||||
error::ResultExt,
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
//! Specifications Issue 6, and the entire `sys/timeb.h` header was removed in
|
||||
//! Issue 7.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::ptr::NonNull;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_uio.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::slice;
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_utsname.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
error::ResultExt,
|
||||
out::Out,
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_wait.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
error::ResultExt,
|
||||
out::Out,
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/termios.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::{
|
||||
errno,
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/time.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
c_str::{CStr, CString},
|
||||
error::{Errno, ResultExt},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//
|
||||
// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/strftime.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::string::String;
|
||||
|
||||
use super::{get_offset, tm};
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::ptr;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::ptr;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/unistd.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
convert::TryFrom,
|
||||
ffi::VaListImpl,
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
//! The `utime.h` header was marked obsolescent in the Open Group Base
|
||||
//! Specifications Issue 7, and removed in Issue 8.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
c_str::CStr,
|
||||
error::ResultExt,
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/openpty.3.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::{sys_ioctl, unistd},
|
||||
platform::types::{c_int, c_void},
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/wchar.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{char, ffi::VaList as va_list, mem, ptr, slice, usize};
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
//UTF implementation parts for wchar.h.
|
||||
//Partially ported from the Sortix libc
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{char, slice, str, usize};
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
// TODO: reuse more code with the thin printf impl
|
||||
use crate::{
|
||||
c_str::{self, WStr},
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use super::lookaheadreader::LookAheadReader;
|
||||
use crate::platform::types::*;
|
||||
use alloc::{string::String, vec::Vec};
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/wctype.h.html>.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
// TODO: *_l functions
|
||||
|
||||
use self::casecmp::casemap;
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
|
||||
//! Buffering wrappers for I/O traits
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{cmp, fmt};
|
||||
|
||||
use crate::io::{
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::cmp;
|
||||
|
||||
use crate::io::{self, Error, ErrorKind, Initializer, SeekFrom, prelude::*};
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::string::String;
|
||||
use core::{cmp, fmt, mem};
|
||||
|
||||
|
||||
@@ -267,9 +267,6 @@
|
||||
//! [`Result`]: ../result/enum.Result.html
|
||||
//! [`.unwrap()`]: ../result/enum.Result.html#method.unwrap
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
pub mod buffered;
|
||||
pub mod cursor;
|
||||
pub mod error;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// FIXME(andypython): remove this when #![allow(warnings, unused_variables)] is
|
||||
// dropped from src/lib.rs.
|
||||
#![warn(warnings, unused_variables)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{mem, ptr};
|
||||
use object::{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// Start code adapted from https://gitlab.redox-os.org/redox-os/relibc/blob/master/src/start.rs
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{
|
||||
borrow::ToOwned,
|
||||
boxed::Box,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::{
|
||||
cell::UnsafeCell,
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#![allow(clippy::derive_hash_xor_eq)]
|
||||
#![allow(clippy::eval_order_dependence)]
|
||||
#![allow(clippy::mut_from_ref)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
// TODO: fix these
|
||||
#![warn(unaligned_references)]
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
/// Print to stdout
|
||||
#[macro_export]
|
||||
macro_rules! print {
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
//! requirement that `&mut` references are never aliased, which can typically not be assumed when
|
||||
//! getting pointers from C.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{cell::UnsafeCell, fmt, marker::PhantomData, mem::MaybeUninit, ptr::NonNull};
|
||||
|
||||
/// Wrapper for write-only "out pointers" that are safe to write to
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
alloc::{GlobalAlloc, Layout},
|
||||
cell::SyncUnsafeCell,
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::{
|
||||
sys_mman::{self, MAP_FAILED, MREMAP_MAYMOVE},
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{arch::asm, num::NonZeroU64, ptr};
|
||||
|
||||
use super::{ERRNO, Pal, types::*};
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! Platform abstractions and environment.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
error::{Errno, ResultExt},
|
||||
io::{self, Read, Write},
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![allow(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
convert::TryFrom,
|
||||
mem::{self, MaybeUninit, size_of},
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! Relibc Threads, or RLCT.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
cell::UnsafeCell,
|
||||
mem::MaybeUninit,
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::cell::UnsafeCell;
|
||||
|
||||
/// Wrapper over `UnsafeCell` that can directly be used in statics, where all modifications require
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! Startup code.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use alloc::{boxed::Box, vec::Vec};
|
||||
use core::{intrinsics, ptr};
|
||||
use generic_rt::ExpectTlsFree;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! Synchronization primitives.
|
||||
|
||||
// TODO: set this for entire crate when possible
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
pub mod barrier;
|
||||
pub mod cond;
|
||||
// TODO: Merge with pthread_mutex
|
||||
|
||||
Reference in New Issue
Block a user