From a286f6b73c45b81b85b720578d01fb0148789ec3 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 6 Aug 2016 14:55:18 +1000 Subject: [PATCH] Get rid of unused variables --- bbs.c | 6 ++---- chat_system.c | 6 ------ doors.c | 1 - email.c | 2 -- files.c | 20 +++----------------- mail_menu.c | 45 ++++++++++++--------------------------------- main.c | 2 +- main_menu.c | 1 - users.c | 1 - 9 files changed, 18 insertions(+), 66 deletions(-) diff --git a/bbs.c b/bbs.c index cf07292..2d2f616 100644 --- a/bbs.c +++ b/bbs.c @@ -308,9 +308,7 @@ void record_last10_callers(struct user_record *user) { struct last10_callers callers[10]; int i,j; - char buffer[256]; - struct tm l10_time; - FILE *fptr = fopen("last10.dat", "rb"); + FILE *fptr = fopen("last10.dat", "rb"); if (fptr != NULL) { for (i=0;i<10;i++) { @@ -346,7 +344,7 @@ void record_last10_callers(struct user_record *user) { void display_last10_callers(struct user_record *user) { struct last10_callers callers[10]; - int i,z,j; + int i,z; struct tm l10_time; FILE *fptr = fopen("last10.dat", "rb"); diff --git a/chat_system.c b/chat_system.c index 94a9b72..e103a8c 100644 --- a/chat_system.c +++ b/chat_system.c @@ -99,21 +99,15 @@ void chat_system(struct user_record *user) { char c; char buffer2[256]; char buffer[513]; - char buffer3[513]; char outputbuffer[513]; int buffer_at = 0; int do_update = 1; int i; - int o; - int l; int j; - int z; - int z2; char *usr; char *cmd; char *where; char *message; - char *pos; char *sep; char *target; memset(inputbuffer, 0, 80); diff --git a/doors.c b/doors.c index d6790f3..19dba9b 100644 --- a/doors.c +++ b/doors.c @@ -134,7 +134,6 @@ void rundoor(struct user_record *user, char *cmd, int stdio) { int ret; char c; int len; - int status; int master; int slave; fd_set fdset; diff --git a/email.c b/email.c index 3bf2495..fd0684e 100644 --- a/email.c +++ b/email.c @@ -270,8 +270,6 @@ void list_emails(struct user_record *user) { char *sql = "SELECT sender,subject,seen,date FROM email WHERE recipient LIKE ?"; char *subject; char *from; - char *to; - char *body; time_t date; int seen; int msgid; diff --git a/files.c b/files.c index 7fb558c..19ff2b8 100644 --- a/files.c +++ b/files.c @@ -15,8 +15,6 @@ extern struct bbs_config conf; extern int gSocket; -static int doCancel = 0; - struct file_entry { char *filename; char *description; @@ -162,7 +160,6 @@ int doIO(ZModem *zm) { void upload_zmodem(struct user_record *user) { ZModem zm; - int done; upload_path = conf.file_directories[user->cur_file_dir]->file_subs[user->cur_file_sub]->upload_path; @@ -179,7 +176,7 @@ void upload_zmodem(struct user_record *user) { zm.packetsize = 1024; - done = ZmodemRInit(&zm); + ZmodemRInit(&zm); doIO(&zm); } @@ -264,15 +261,6 @@ void upload(struct user_record *user) { void download_zmodem(struct user_record *user, char *filename) { ZModem zm; int done ; - fd_set readfds; - struct timeval timeout; - int i; - int j; - int len; - int pos; - - u_char buffer[2048]; - u_char buffer2[1024]; dolog("Attempting to upload %s", filename); @@ -337,10 +325,9 @@ void download(struct user_record *user) { char *usql = "update files set dlcount=? where filename like ?"; char buffer[256]; int dloads; - char *err_msg = NULL; sqlite3 *db; - sqlite3_stmt *res; - int rc; + sqlite3_stmt *res; + int rc; for (i=0;i