From 4813f76942b44fa45159fcd743657ce203601464 Mon Sep 17 00:00:00 2001 From: wens Date: Sat, 21 Mar 2009 11:47:30 +0000 Subject: Clean up some compile warnings (unused, signess) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4448 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chat.c | 10 +++++----- mbbsd/chicken.c | 2 +- mbbsd/mail.c | 14 +++++++------- mbbsd/mbbsd.c | 6 +++--- mbbsd/user.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/chat.c b/mbbsd/chat.c index 2904f2d4..e6a78842 100644 --- a/mbbsd/chat.c +++ b/mbbsd/chat.c @@ -29,7 +29,7 @@ printchatline(const char *str) } static void -chat_clear(char*unused) +chat_clear(char *unused GCC_UNUSED) { for (chatline = 2; chatline < STOP_LINE; chatline++) { move(chatline, 0); @@ -166,7 +166,7 @@ chat_help(char *arg) } static void -chat_date(char *unused) +chat_date(char *unused GCC_UNUSED) { char genbuf[200]; @@ -176,7 +176,7 @@ chat_date(char *unused) } static void -chat_pager(char *unused) +chat_pager(char *unused GCC_UNUSED) { char genbuf[200]; @@ -252,7 +252,7 @@ chat_cmd_match(const char *buf, const char *str) } static int -chat_cmd(char *buf, int fd) +chat_cmd(char *buf, int fd GCC_UNUSED) { int i; @@ -278,7 +278,7 @@ typedef struct { } ChatCbParam; static int -_vgetcb_peek(int key, VGET_RUNTIME *prt, void *instance) +_vgetcb_peek(int key, VGET_RUNTIME *prt GCC_UNUSED, void *instance) { ChatCbParam *p = (ChatCbParam*) instance; assert(p); diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c index a409ce90..12921166 100644 --- a/mbbsd/chicken.c +++ b/mbbsd/chicken.c @@ -766,7 +766,7 @@ ch_changename(chicken_t *mychicken) } static int -select_menu(int age, chicken_t *mychicken) +select_menu(int age GCC_UNUSED, chicken_t *mychicken) { char ch; diff --git a/mbbsd/mail.c b/mbbsd/mail.c index fc7ae823..c006bac6 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -870,7 +870,7 @@ mail_mbox(void) } static int -m_forward(int ent, fileheader_t * fhdr, const char *direct) +m_forward(int ent GCC_UNUSED, fileheader_t * fhdr, const char *direct GCC_UNUSED) { char uid[STRLEN]; @@ -1227,7 +1227,7 @@ mail_read(int ent, fileheader_t * fhdr, const char *direct) } static int -mail_read_all(int ent, fileheader_t * fhdr, const char *direct) +mail_read_all(int ent GCC_UNUSED, fileheader_t * fhdr GCC_UNUSED, const char *direct GCC_UNUSED) { off_t i = 0, num = 0; int fd = 0; @@ -1369,7 +1369,7 @@ mail_reply(int ent, fileheader_t * fhdr, const char *direct) } static int -mail_edit(int ent, fileheader_t * fhdr, const char *direct) +mail_edit(int ent GCC_UNUSED, fileheader_t * fhdr, const char *direct) { char genbuf[PATHLEN]; @@ -1382,7 +1382,7 @@ mail_edit(int ent, fileheader_t * fhdr, const char *direct) } static int -mail_nooutmail(int ent, fileheader_t * fhdr, const char *direct) +mail_nooutmail(int ent GCC_UNUSED, fileheader_t * fhdr GCC_UNUSED, const char *direct GCC_UNUSED) { cuser.uflag2 ^= REJ_OUTTAMAIL; passwd_update(usernum, &cuser); @@ -1597,7 +1597,7 @@ mail_man(void) // XXX BUG mail_cite 有可能會跳進 a_menu, 而 a_menu 會 check // currbid。 一整個糟糕的邏輯錯誤... static int -mail_cite(int ent, fileheader_t * fhdr, const char *direct) +mail_cite(int ent GCC_UNUSED, fileheader_t * fhdr, const char *direct GCC_UNUSED) { char fpath[PATHLEN]; char title[TTLEN + 1]; @@ -1642,7 +1642,7 @@ mail_cite(int ent, fileheader_t * fhdr, const char *direct) } static int -mail_save(int ent, fileheader_t * fhdr, const char *direct) +mail_save(int ent GCC_UNUSED, fileheader_t * fhdr GCC_UNUSED, const char *direct GCC_UNUSED) { char fpath[PATHLEN]; char title[TTLEN + 1]; @@ -1661,7 +1661,7 @@ mail_save(int ent, fileheader_t * fhdr, const char *direct) #ifdef OUTJOBSPOOL static int -mail_waterball(int ent, fileheader_t * fhdr, const char *direct) +mail_waterball(int ent GCC_UNUSED, fileheader_t * fhdr, const char *direct GCC_UNUSED) { static char address[60] = "", cmode = 1; char fname[500], genbuf[200]; diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 0b72cae7..1deaee01 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -134,7 +134,7 @@ start_daemon(void) } static void -reapchild(int sig) +reapchild(int sig GCC_UNUSED) { int state, pid; @@ -226,7 +226,7 @@ u_exit(const char *mode) } void -abort_bbs(int sig) +abort_bbs(int sig GCC_UNUSED) { /* ignore normal signals */ Signal(SIGALRM, SIG_IGN); @@ -337,7 +337,7 @@ mysrand(void) } void -talk_request(int sig) +talk_request(int sig GCC_UNUSED) { STATINC(STAT_TALKREQUEST); bell(); diff --git a/mbbsd/user.c b/mbbsd/user.c index 68f79a83..d2778619 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -986,7 +986,7 @@ uinfo_query(userec_t *u, int adminmode, int unum) case '3': { - int tmp = setperms(x.userlevel, str_permid); + unsigned int tmp = setperms(x.userlevel, str_permid); if (tmp == x.userlevel) fail++; else { -- cgit v1.2.3