Skip to content

Commit 790ecd9

Browse files
committed
psx/sys: Fix warnings for println in unsafe blocks
1 parent a293a87 commit 790ecd9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

psx/src/sys/tty.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ macro_rules! println {
107107
{
108108
use $crate::sys::tty::TTY;
109109
<TTY as core::fmt::Write>::write_fmt(&mut TTY, format_args!($($args)*)).ok();
110-
// SAFETY: The string is null-terminated.
110+
// SAFETY: The string is null-terminated. The attribute avoids warnings for nested
111+
// unsafe blocks
112+
#[allow(unused_unsafe)]
111113
unsafe {
112114
$crate::sys::kernel::psx_printf(b"\n\0".as_ptr() as *const i8);
113115
}

0 commit comments

Comments
 (0)