Skip to content

Commit 36ebdc6

Browse files
committed
Apply missing_unsafe_on_extern
1 parent 7e8e3d5 commit 36ebdc6

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/backtrace/libunwind.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ mod uw {
170170
pub type _Unwind_Trace_Fn =
171171
extern "C" fn(ctx: *mut _Unwind_Context, arg: *mut c_void) -> _Unwind_Reason_Code;
172172

173-
extern "C" {
173+
unsafe extern "C" {
174174
pub fn _Unwind_Backtrace(
175175
trace: _Unwind_Trace_Fn,
176176
trace_argument: *mut c_void,
@@ -188,7 +188,7 @@ mod uw {
188188
not(all(target_os = "vita", target_arch = "arm")),
189189
not(all(target_os = "nuttx", target_arch = "arm")),
190190
))] {
191-
extern "C" {
191+
unsafe extern "C" {
192192
pub fn _Unwind_GetIP(ctx: *mut _Unwind_Context) -> libc::uintptr_t;
193193
pub fn _Unwind_FindEnclosingFunction(pc: *mut c_void) -> *mut c_void;
194194

@@ -208,7 +208,7 @@ mod uw {
208208
// instead of relying on _Unwind_GetCFA.
209209
#[cfg(all(target_os = "linux", target_arch = "s390x"))]
210210
pub unsafe fn get_sp(ctx: *mut _Unwind_Context) -> libc::uintptr_t {
211-
extern "C" {
211+
unsafe extern "C" {
212212
pub fn _Unwind_GetGR(ctx: *mut _Unwind_Context, index: libc::c_int) -> libc::uintptr_t;
213213
}
214214
unsafe { _Unwind_GetGR(ctx, 15) }
@@ -248,7 +248,7 @@ mod uw {
248248
}
249249

250250
type _Unwind_Word = libc::c_uint;
251-
extern "C" {
251+
unsafe extern "C" {
252252
fn _Unwind_VRS_Get(
253253
ctx: *mut _Unwind_Context,
254254
klass: _Unwind_VRS_RegClass,

src/print/fuchsia.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use core::mem::{size_of, transmute};
33
use core::slice::from_raw_parts;
44
use libc::c_char;
55

6-
extern "C" {
6+
unsafe extern "C" {
77
// dl_iterate_phdr takes a callback that will receive a dl_phdr_info pointer
88
// for every DSO that has been linked into the process. dl_iterate_phdr also
99
// ensures that the dynamic linker is locked from start to finish of the

src/symbolize/gimli/libs_aix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use core::mem;
1111

1212
const EXE_IMAGE_BASE: u64 = 0x100000000;
1313

14-
extern "C" {
14+
unsafe extern "C" {
1515
#[link_name = "_Errno"]
1616
fn errno_location() -> *mut c_int;
1717
}

src/symbolize/gimli/libs_illumos.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct LinkMap {
2626
const RTLD_SELF: *const libc::c_void = -3isize as *const libc::c_void;
2727
const RTLD_DI_LINKMAP: libc::c_int = 2;
2828

29-
extern "C" {
29+
unsafe extern "C" {
3030
fn dlinfo(
3131
handle: *const libc::c_void,
3232
request: libc::c_int,

src/symbolize/gimli/libs_libnx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use alloc::vec::Vec;
44
// DevkitA64 doesn't natively support debug info, but the build system will
55
// place debug info at the path `romfs:/debug_info.elf`.
66
pub(super) fn native_libraries() -> Vec<Library> {
7-
extern "C" {
7+
unsafe extern "C" {
88
static __start__: u8;
99
}
1010

0 commit comments

Comments
 (0)