mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
Fix build warning unnecessary unsafe
This commit is contained in:
parent
2c2d21044f
commit
e583226510
@ -20,11 +20,9 @@ pub fn is_emscripten_module(module: &Module) -> bool {
|
|||||||
pub unsafe fn write_to_buf(string: *const c_char, buf: u32, max: u32, instance: &Instance) -> u32 {
|
pub unsafe fn write_to_buf(string: *const c_char, buf: u32, max: u32, instance: &Instance) -> u32 {
|
||||||
let buf_addr = instance.memory_offset_addr(0, buf as _) as *mut c_char;
|
let buf_addr = instance.memory_offset_addr(0, buf as _) as *mut c_char;
|
||||||
|
|
||||||
unsafe {
|
|
||||||
for i in 0..max {
|
for i in 0..max {
|
||||||
*buf_addr.add(i as _) = *string.add(i as _);
|
*buf_addr.add(i as _) = *string.add(i as _);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
buf
|
buf
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user