Skip to content

Commit

Permalink
Fix warnings in miniz_oxide_c_api
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindln committed Dec 22, 2022
1 parent f4ee585 commit c9128cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ mod miniz {
use super::*;
use libc::{c_int, c_void};

/// Functions from miniz
/// We add the link attribute to make sure
/// these are linked to the miniz ones rather than
/// picking up the rust versions (as they may be exported).
// Functions from miniz
// We add the link attribute to make sure
// these are linked to the miniz ones rather than
// picking up the rust versions (as they may be exported).
#[link(name = "miniz", kind = "static")]
extern "C" {
fn tinfl_decompress_mem_to_heap(
Expand Down
2 changes: 1 addition & 1 deletion src/tdef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ unmangle!(
/// allocated by it.
pub unsafe extern "C" fn tdefl_deallocate(c: *mut Compressor) {
if !c.is_null() {
Box::from_raw(c);
drop(Box::from_raw(c));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/tinfl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ unmangle!(
/// allocated by it.
pub unsafe extern "C" fn tinfl_decompressor_free(c: *mut tinfl_decompressor) {
if !c.is_null() {
Box::from_raw(c);
drop(Box::from_raw(c));
}
}

Expand Down

0 comments on commit c9128cb

Please sign in to comment.