Fix or silence some clippy warnings

This commit is contained in:
ZacJW 2025-12-10 14:51:04 +00:00
parent 8007f0df08
commit 41952f7b02

View file

@ -15,6 +15,7 @@
//! installed to start using libburn-sys.
#![allow(non_camel_case_types)]
#![allow(clippy::useless_transmute)]
/* automatically generated by rust-bindgen 0.72.1 */
@ -55,7 +56,7 @@ where
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
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)
}
@ -81,7 +82,7 @@ where
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
let byte_index = index / 8;
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) };
}
@ -1051,6 +1052,7 @@ impl burn_drive_info {
)
}
}
#[expect(clippy::too_many_arguments)]
#[inline]
pub fn new_bitfield_1(
read_dvdram: ::std::os::raw::c_uint,
@ -1384,7 +1386,9 @@ unsafe extern "C" {
unsafe extern "C" {
/// 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.
/// - 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
/// libburn-hackers@pykix.org
/// 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.
///
/// @return 0 while scanning is not complete
/// >0 when it is finished successfully,
/// @return 0 while scanning is not complete,
/// \>0 when it is finished successfully,
/// <0 when finished but failed.
pub fn burn_drive_scan(
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 the media profile supports simulated burning
/// - @since 1.5.6
///
/// 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
/// for a few thousand additional blocks on CD media with write type SAO.