Skip to content

Commit d31ae9a

Browse files
committed
Remove conditionally unused libc imports
1 parent 6920178 commit d31ae9a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

libhdf5-sys/src/h5.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pub use self::H5_iter_order_t::*;
22
pub use self::H5_index_t::*;
33

4-
use libc::{c_int, c_uint, c_void, c_ulonglong, c_longlong, uint64_t, size_t};
4+
use libc::{c_int, c_uint, c_ulonglong, c_longlong, uint64_t};
55

66
pub type herr_t = c_int;
77
pub type hbool_t = c_uint;
@@ -60,11 +60,17 @@ extern {
6060
pub fn H5check_version(majnum: c_uint, minnum: c_uint, relnum: c_uint) -> herr_t;
6161
}
6262

63+
#[cfg(hdf5_1_8_13)]
64+
use libc::c_void;
65+
6366
#[cfg(hdf5_1_8_13)]
6467
extern {
6568
pub fn H5free_memory(mem: *mut c_void) -> herr_t;
6669
}
6770

71+
#[cfg(hdf5_1_8_15)]
72+
use libc::size_t;
73+
6874
#[cfg(hdf5_1_8_15)]
6975
extern {
7076
pub fn H5allocate_memory(size: size_t, clear: hbool_t) -> *mut c_void;

libhdf5-sys/src/h5o.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pub use self::H5O_mcdt_search_ret_t::*;
33

44
use libc::{c_uint, c_void, c_char, c_ulong, size_t, ssize_t, uint32_t, uint64_t, time_t};
55

6-
use h5::{herr_t, hsize_t, haddr_t, htri_t, H5_index_t, H5_iter_order_t, H5_ih_info_t};
6+
use h5::{herr_t, hsize_t, haddr_t, H5_index_t, H5_iter_order_t, H5_ih_info_t};
77
use h5i::hid_t;
88

99
pub const H5O_COPY_SHALLOW_HIERARCHY_FLAG: c_uint = 0x0001;
@@ -172,6 +172,9 @@ extern {
172172
pub fn H5Oclose(object_id: hid_t) -> herr_t;
173173
}
174174

175+
#[cfg(hdf5_1_8_5)]
176+
use h5::htri_t;
177+
175178
#[cfg(hdf5_1_8_5)]
176179
extern {
177180
pub fn H5Oexists_by_name(loc_id: hid_t, name: *const c_char, lapl_id: hid_t) -> htri_t;

0 commit comments

Comments
 (0)