Skip to content

Commit

Permalink
fix warning in test case
Browse files Browse the repository at this point in the history
  • Loading branch information
cpetig committed Sep 1, 2024
1 parent ca5b357 commit 7fde681
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/cpp/tests/symmetric_tests/strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ pub fn main() {
{
#[link(name = "strings")]
extern "C" {
fn roundtrip();
fn roundtrip(_: *mut u8, _: usize, _: *mut u8);
}
let _ = || {
unsafe { roundtrip() };
unsafe { roundtrip(core::ptr::null_mut(), 0, core::ptr::null_mut()) };
};
}
}
4 changes: 2 additions & 2 deletions crates/rust/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ macro_rules! {macro_name} {{
"struct _RetArea([::core::mem::MaybeUninit::<u8>; {size}]);
static mut _RET_AREA: _RetArea = _RetArea([::core::mem::MaybeUninit::uninit(); {size}]);
",
size = self.return_pointer_area_size.format(POINTER_SIZE_EXPRESSION),
size = self.return_pointer_area_size.format_term(POINTER_SIZE_EXPRESSION, true),
);
}

Expand Down Expand Up @@ -923,7 +923,7 @@ impl {async_support}::StreamPayload for {name} {{
self.src,
"struct RetArea([::core::mem::MaybeUninit::<u8>; {import_return_pointer_area_size}]);
let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); {import_return_pointer_area_size}]);
", import_return_pointer_area_size = import_return_pointer_area_size.format(POINTER_SIZE_EXPRESSION)
", import_return_pointer_area_size = import_return_pointer_area_size.format_term(POINTER_SIZE_EXPRESSION, true)
);
}
self.src.push_str(&String::from(src));
Expand Down

0 comments on commit 7fde681

Please sign in to comment.