mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
chore: fix compiler warnings (mut + unused assignments) (#40)
* Stop allowing unused assignments
* test: remove unused assignments in cmdline
* chore: fix compiler warnings in dc_tools.rs
* chore: fix compiler warnings in dc_token.rs
* chore: fix compiler warnings in dc_strencode.rs
* chore: fix compiler warnings in dc_stock.rs
* chore: fix compiler warnings in dc_sqlite3.rs
* chore: fix compiler warnings in dc_simplify.rs
* chore: fix compiler warnings in dc_securejoin.rs
* chore: fix compiler warnings in dc_saxparser.rs
* chore: fix compiler warnings in dc_pgp.rs
* chore: fix compiler warnings in dc_param.rs
* chore: fix compiler warnings in dc_oauth2.rs
* chore: fix compiler warnings in dc_msg.rs
* chore: fix compiler warnings in dc_mimeparser.rs
* chore: fix compiler warnings in dc_mimefactory.rs
* chore: fix compiler warnings in dc_lot.rs
* chore: fix compiler warnings in dc_loginparams.rs
* chore: fix compiler warnings in dc_log.rs
* chore: fix compiler warnings in dc_location.rs
* chore: fix compiler warnings in dc_keyring.rs
* chore: fix compiler warnings in dc_key.rs
* chore: fix compiler warnings in dc_jsmn.rs
* chore: fix compiler warnings in dc_jobthread.rs
* chore: fix compiler warnings in dc_imex.rs
* chore: fix compiler warnings in dc_hash.rs
* chore: fix compiler warnings in dc_e2ee.rs
* chore: fix compiler warnings in dc_context.rs
* chore: fix compiler warnings in dc_contact.rs
* chore: fix compiler warnings in dc_chatlist.rs
* chore: fix compiler warnings in dc_chat.rs
* chore: fix compiler warnings in dc_array.rs
* chore: fix compiler warnings in dc_apeerstate.rs
* chore: fix compiler warnings in dc_aheader.rs
* chore: fix compiler warnings in dc_array.rs
* test: remove compiler warnings in test/stress.rs
* test: reduce compiler warnings in examples/repl/main.rs
* test: std:🧵:sleep_ms() is deprecated
* chore: remove unused variable in dc_sqlite3.rs
* chore: fix compiler warnings in dc_receive_imf.rs
* chore: fix compiler warnings in dc_job.rs
* chore: fix compiler warnings in dc_configure.rs
* Fix formatting
This commit is contained in:
committed by
Friedel Ziegelmayer
parent
67f1d67de7
commit
2cf6cde5d1
@@ -69,7 +69,7 @@ unsafe fn dc_job_perform(
|
||||
mut probe_network: libc::c_int,
|
||||
) {
|
||||
println!("perform job");
|
||||
let mut select_stmt: *mut sqlite3_stmt = 0 as *mut sqlite3_stmt;
|
||||
let mut select_stmt: *mut sqlite3_stmt;
|
||||
let mut job: dc_job_t = dc_job_t {
|
||||
job_id: 0,
|
||||
action: 0,
|
||||
@@ -556,7 +556,7 @@ unsafe fn dc_job_do_DC_JOB_MOVE_MSG(mut context: &dc_context_t, mut job: *mut dc
|
||||
* IMAP-jobs
|
||||
******************************************************************************/
|
||||
unsafe fn connect_to_inbox(context: &dc_context_t, inbox: &dc_imap_t) -> libc::c_int {
|
||||
let mut ret_connected: libc::c_int = 0i32;
|
||||
let mut ret_connected: libc::c_int;
|
||||
|
||||
ret_connected = dc_connect_to_configured_imap(context, inbox);
|
||||
if !(0 == ret_connected) {
|
||||
@@ -813,7 +813,7 @@ unsafe fn dc_add_smtp_job(
|
||||
mut action: libc::c_int,
|
||||
mut mimefactory: *mut dc_mimefactory_t,
|
||||
) -> libc::c_int {
|
||||
let mut pathNfilename: *mut libc::c_char = 0 as *mut libc::c_char;
|
||||
let mut pathNfilename: *mut libc::c_char;
|
||||
let mut success: libc::c_int = 0i32;
|
||||
let mut recipients: *mut libc::c_char = 0 as *mut libc::c_char;
|
||||
let mut param: *mut dc_param_t = dc_param_new();
|
||||
@@ -880,8 +880,8 @@ pub unsafe fn dc_job_add(
|
||||
mut delay_seconds: libc::c_int,
|
||||
) {
|
||||
let mut timestamp: time_t = time(0 as *mut time_t);
|
||||
let mut stmt: *mut sqlite3_stmt = 0 as *mut sqlite3_stmt;
|
||||
let mut thread: libc::c_int = 0i32;
|
||||
let mut stmt: *mut sqlite3_stmt;
|
||||
let mut thread: libc::c_int;
|
||||
if action >= 100i32 && action < 100i32 + 1000i32 {
|
||||
thread = 100i32
|
||||
} else if action >= 5000i32 && action < 5000i32 + 1000i32 {
|
||||
@@ -1285,8 +1285,8 @@ pub unsafe fn dc_job_action_exists(
|
||||
mut context: &dc_context_t,
|
||||
mut action: libc::c_int,
|
||||
) -> libc::c_int {
|
||||
let mut job_exists: libc::c_int = 0i32;
|
||||
let mut stmt = 0 as *mut sqlite3_stmt;
|
||||
let mut job_exists: libc::c_int;
|
||||
let mut stmt;
|
||||
stmt = dc_sqlite3_prepare(
|
||||
context,
|
||||
&context.sql.clone().read().unwrap(),
|
||||
|
||||
Reference in New Issue
Block a user