diff --git a/src/dc_saxparser.rs b/src/dc_saxparser.rs index 38c6058c1..c1a95a696 100644 --- a/src/dc_saxparser.rs +++ b/src/dc_saxparser.rs @@ -22,11 +22,6 @@ pub type dc_saxparser_starttag_cb_t = Option< unsafe fn(_: *mut libc::c_void, _: *const libc::c_char, _: *mut *mut libc::c_char) -> (), >; -#[inline] -unsafe fn isascii(mut _c: libc::c_int) -> libc::c_int { - return (_c & !0x7fi32 == 0i32) as libc::c_int; -} - pub unsafe extern "C" fn dc_saxparser_init( mut saxparser: *mut dc_saxparser_t, mut userdata: *mut libc::c_void, diff --git a/src/dc_strencode.rs b/src/dc_strencode.rs index c56f07108..2e9fb1030 100644 --- a/src/dc_strencode.rs +++ b/src/dc_strencode.rs @@ -4,11 +4,6 @@ use crate::dc_tools::*; use crate::types::*; use crate::x::*; -#[inline] -unsafe fn isascii(mut _c: libc::c_int) -> libc::c_int { - return (_c & !0x7fi32 == 0i32) as libc::c_int; -} - #[inline] unsafe fn __isctype(mut _c: __darwin_ct_rune_t, mut _f: libc::c_ulong) -> __darwin_ct_rune_t { return if _c < 0i32 || _c >= 1i32 << 8i32 { diff --git a/src/lib.rs b/src/lib.rs index 8ce93849d..859ee6bec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,4 @@ #![allow( - dead_code, mutable_transmutes, non_camel_case_types, non_snake_case, diff --git a/src/pgp/key.rs b/src/pgp/key.rs index ae6a6c9b9..c15278bdd 100644 --- a/src/pgp/key.rs +++ b/src/pgp/key.rs @@ -13,6 +13,7 @@ pub type public_or_secret_key = PublicOrSecret; /// Creates an in-memory representation of a PGP key, based on the armor file given. /// The returned pointer should be stored, and reused when calling methods "on" this key. /// When done with it [rpgp_key_drop] should be called, to free the memory. +#[allow(dead_code)] pub unsafe fn rpgp_key_from_armor(raw: *const u8, len: libc::size_t) -> *mut public_or_secret_key { assert!(!raw.is_null()); assert!(len > 0); @@ -58,6 +59,7 @@ pub unsafe extern "C" fn rpgp_key_from_bytes( } /// Returns the KeyID for the passed in key. The caller is responsible to call [rpgp_string_drop] with the returned memory, to free it. +#[allow(dead_code)] pub unsafe fn rpgp_key_id(key_ptr: *mut public_or_secret_key) -> *mut c_char { assert!(!key_ptr.is_null()); diff --git a/src/pgp/message.rs b/src/pgp/message.rs index 208bfed34..82cb733f5 100644 --- a/src/pgp/message.rs +++ b/src/pgp/message.rs @@ -211,6 +211,7 @@ pub unsafe fn rpgp_msg_drop(msg_ptr: *mut message) { } /// Get the number of fingerprints of a given encrypted message. +#[allow(dead_code)] pub unsafe fn rpgp_msg_recipients_len(msg_ptr: *mut message) -> u32 { assert!(!msg_ptr.is_null()); @@ -222,6 +223,7 @@ pub unsafe fn rpgp_msg_recipients_len(msg_ptr: *mut message) -> u32 { } /// Get the fingerprint of a given encrypted message, by index, in hexformat. +#[allow(dead_code)] pub unsafe fn rpgp_msg_recipients_get(msg_ptr: *mut message, i: u32) -> *mut c_char { assert!(!msg_ptr.is_null()); diff --git a/src/pgp/public_key.rs b/src/pgp/public_key.rs index 68e1b7e72..80f6bbecc 100644 --- a/src/pgp/public_key.rs +++ b/src/pgp/public_key.rs @@ -40,6 +40,7 @@ pub unsafe extern "C" fn rpgp_pkey_to_bytes(pkey_ptr: *mut signed_public_key) -> } /// Get the key id of the given [signed_public_key]. +#[allow(dead_code)] pub unsafe fn rpgp_pkey_key_id(pkey_ptr: *mut signed_public_key) -> *mut c_char { assert!(!pkey_ptr.is_null()); diff --git a/src/pgp/secret_key.rs b/src/pgp/secret_key.rs index 29642c022..b727a086b 100644 --- a/src/pgp/secret_key.rs +++ b/src/pgp/secret_key.rs @@ -33,7 +33,8 @@ pub unsafe fn rpgp_create_rsa_skey(bits: u32, user_id: *const c_char) -> *mut si } /// Generates a new x25519 key. -pub unsafe extern "C" fn rpgp_create_x25519_skey(user_id: *const c_char) -> *mut signed_secret_key { +#[allow(dead_code)] +pub unsafe fn rpgp_create_x25519_skey(user_id: *const c_char) -> *mut signed_secret_key { assert!(!user_id.is_null()); let user_id = CStr::from_ptr(user_id); @@ -71,6 +72,7 @@ pub unsafe fn rpgp_skey_public_key(skey_ptr: *mut signed_secret_key) -> *mut sig } /// Returns the KeyID for the passed in key. +#[allow(dead_code)] pub unsafe fn rpgp_skey_key_id(skey_ptr: *mut signed_secret_key) -> *mut c_char { assert!(!skey_ptr.is_null());