Skip to content

Commit

Permalink
Merge pull request #152 from ANSSI-FR/fix-clippy
Browse files Browse the repository at this point in the history
clippy: authorize fn-null-checks for extern C api
  • Loading branch information
commial committed Apr 24, 2023
2 parents be78aa4 + d3f3b45 commit 11a6ee4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bindings/C/src/lib.rs
Expand Up @@ -310,6 +310,7 @@ pub extern "C" fn mla_reader_config_add_private_key(
/// through the write_callback, and flushed at least at the end when the last byte is
/// written. The context pointer can be used to hold any information, and is passed
/// as an argument when any of the two callbacks are called.
#[allow(clippy::fn_null_check)]
#[no_mangle]
pub extern "C" fn mla_archive_new(
config: *mut MLAConfigHandle,
Expand Down Expand Up @@ -536,6 +537,7 @@ impl Seek for CallbackInputRead {
/// read_callback and seek_callback are used to read the archive data
/// file_callback is used to convert each archive file's name to pathes where extract the data
/// The caller is responsible of all security checks related to callback provided paths
#[allow(clippy::fn_null_check)]
#[no_mangle]
pub extern "C" fn mla_roarchive_extract(
config: *mut MLAConfigHandle,
Expand Down Expand Up @@ -624,6 +626,7 @@ pub struct ArchiveInfo {
}

/// Get info on an existing MLA archive
#[allow(clippy::fn_null_check)]
#[no_mangle]
pub extern "C" fn mla_roarchive_info(
read_callback: MlaReadCallback,
Expand Down

0 comments on commit 11a6ee4

Please sign in to comment.