Browse Source

Merge pull request #12 from ian-h-chamberlain/clippy-libc-update

Update to upstream libc and fix some clippy lints
pull/14/head
Meziu 2 years ago committed by GitHub
parent
commit
d5d3be4a0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Cargo.toml
  2. 6
      src/lib.rs

2
Cargo.toml

@ -7,4 +7,4 @@ edition = "2018"
[dependencies] [dependencies]
ctru-sys = { git = "https://github.com/Meziu/ctru-rs.git" } ctru-sys = { git = "https://github.com/Meziu/ctru-rs.git" }
libc = { git = "https://github.com/Meziu/libc.git" } libc = "0.2.126"

6
src/lib.rs

@ -11,7 +11,7 @@ const ECTRU: libc::c_int = -1;
/// Call this somewhere to force Rust to link this module. /// Call this somewhere to force Rust to link this module.
/// The call doesn't need to execute, just exist. /// The call doesn't need to execute, just exist.
/// ///
/// See https://github.com/rust-lang/rust/issues/47384 /// See <https://github.com/rust-lang/rust/issues/47384>
pub fn init() {} pub fn init() {}
extern "C" { extern "C" {
@ -20,14 +20,12 @@ extern "C" {
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn posix_memalign( pub unsafe extern "C" fn posix_memalign(
memptr: *mut *mut libc::c_void, memptr: *mut *mut libc::c_void,
align: libc::size_t, align: libc::size_t,
size: libc::size_t, size: libc::size_t,
) -> libc::c_int { ) -> libc::c_int {
unsafe {
*memptr = libc::memalign(align, size); *memptr = libc::memalign(align, size);
}
0 0
} }

Loading…
Cancel
Save