Fix or silence some clippy warnings
This commit is contained in:
parent
8007f0df08
commit
41952f7b02
1 changed files with 10 additions and 5 deletions
15
src/lib.rs
15
src/lib.rs
|
|
@ -15,6 +15,7 @@
|
||||||
//! installed to start using libburn-sys.
|
//! installed to start using libburn-sys.
|
||||||
|
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
#![allow(clippy::useless_transmute)]
|
||||||
|
|
||||||
/* automatically generated by rust-bindgen 0.72.1 */
|
/* automatically generated by rust-bindgen 0.72.1 */
|
||||||
|
|
||||||
|
|
@ -55,7 +56,7 @@ where
|
||||||
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
|
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
|
||||||
let byte_index = index / 8;
|
let byte_index = index / 8;
|
||||||
let byte = unsafe {
|
let byte = unsafe {
|
||||||
*(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
|
*(core::ptr::addr_of!((*this).storage) as *const u8).add(byte_index)
|
||||||
};
|
};
|
||||||
Self::extract_bit(byte, index)
|
Self::extract_bit(byte, index)
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +82,7 @@ where
|
||||||
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
|
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
|
||||||
let byte_index = index / 8;
|
let byte_index = index / 8;
|
||||||
let byte = unsafe {
|
let byte = unsafe {
|
||||||
(core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
|
(core::ptr::addr_of_mut!((*this).storage) as *mut u8).add(byte_index)
|
||||||
};
|
};
|
||||||
unsafe { *byte = Self::change_bit(*byte, index, val) };
|
unsafe { *byte = Self::change_bit(*byte, index, val) };
|
||||||
}
|
}
|
||||||
|
|
@ -1051,6 +1052,7 @@ impl burn_drive_info {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[expect(clippy::too_many_arguments)]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new_bitfield_1(
|
pub fn new_bitfield_1(
|
||||||
read_dvdram: ::std::os::raw::c_uint,
|
read_dvdram: ::std::os::raw::c_uint,
|
||||||
|
|
@ -1384,7 +1386,9 @@ unsafe extern "C" {
|
||||||
unsafe extern "C" {
|
unsafe extern "C" {
|
||||||
/// Allows the use of media types which are implemented in libburn but not yet
|
/// Allows the use of media types which are implemented in libburn but not yet
|
||||||
/// tested. The list of those untested profiles is subject to change.
|
/// tested. The list of those untested profiles is subject to change.
|
||||||
/// - Currently no media types are under test reservation -
|
///
|
||||||
|
/// Currently no media types are under test reservation
|
||||||
|
///
|
||||||
/// If you really test such media, then please report the outcome on
|
/// If you really test such media, then please report the outcome on
|
||||||
/// libburn-hackers@pykix.org
|
/// libburn-hackers@pykix.org
|
||||||
/// If ever then this call should be done soon after burn_initialize() before
|
/// If ever then this call should be done soon after burn_initialize() before
|
||||||
|
|
@ -1525,8 +1529,8 @@ unsafe extern "C" {
|
||||||
///
|
///
|
||||||
/// @param n_drives Returns the number of drive items in drive_infos.
|
/// @param n_drives Returns the number of drive items in drive_infos.
|
||||||
///
|
///
|
||||||
/// @return 0 while scanning is not complete
|
/// @return 0 while scanning is not complete,
|
||||||
/// >0 when it is finished successfully,
|
/// \>0 when it is finished successfully,
|
||||||
/// <0 when finished but failed.
|
/// <0 when finished but failed.
|
||||||
pub fn burn_drive_scan(
|
pub fn burn_drive_scan(
|
||||||
drive_infos: *mut *mut burn_drive_info,
|
drive_infos: *mut *mut burn_drive_info,
|
||||||
|
|
@ -4510,6 +4514,7 @@ unsafe extern "C" {
|
||||||
/// - the check whether CD write+block type is supported by the drive
|
/// - the check whether CD write+block type is supported by the drive
|
||||||
/// - the check whether the media profile supports simulated burning
|
/// - the check whether the media profile supports simulated burning
|
||||||
/// - @since 1.5.6
|
/// - @since 1.5.6
|
||||||
|
///
|
||||||
/// The check whether a write operation exceeds the size of the medium
|
/// The check whether a write operation exceeds the size of the medium
|
||||||
/// as announced by the drive. This is known as \"overburn\" and may work
|
/// as announced by the drive. This is known as \"overburn\" and may work
|
||||||
/// for a few thousand additional blocks on CD media with write type SAO.
|
/// for a few thousand additional blocks on CD media with write type SAO.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue