mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
cleanup: fixup deadcode
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![allow(
|
||||
dead_code,
|
||||
mutable_transmutes,
|
||||
non_camel_case_types,
|
||||
non_snake_case,
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user