From af0bba7f92b2be1a15dab738935cd988278e13aa Mon Sep 17 00:00:00 2001 From: piaip Date: Thu, 25 Aug 2005 05:41:46 +0000 Subject: eliminate more compiler warnings git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3083 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 2 +- mbbsd/convert.c | 4 ++-- mbbsd/dark.c | 2 +- mbbsd/edit.c | 4 ++-- mbbsd/menu.c | 2 +- mbbsd/var.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index a142286f..d5395d6b 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1179,7 +1179,7 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct) { int c = 0; struct tm *ptime; - time_t xt = (time_t)newstat.st_mtime; + time4_t xt = (time4_t)newstat.st_mtime; fprintf(fp, MSG_SEPERATOR "\n"); fprintf(fp, "以下為被別人修改過的最新內容: "); diff --git a/mbbsd/convert.c b/mbbsd/convert.c index ae178f8c..6a102230 100644 --- a/mbbsd/convert.c +++ b/mbbsd/convert.c @@ -15,7 +15,7 @@ gb_input(void *buf, ssize_t icount) { /* is sizeof(ssize_t) == sizeof(int)? not sure */ int ic = (int) icount; - gb2big((char *)buf, &ic, 0); + gb2big((unsigned char *)buf, &ic, 0); return (ssize_t)ic; } @@ -73,7 +73,7 @@ utf8_write(int fd, void *buf, size_t count) if(cmybuf < count * 4) { cmybuf = (count*4+0x80) & (~0x7f) ; - mybuf = (char*) realloc (mybuf, cmybuf); + mybuf = (unsigned char*) realloc (mybuf, cmybuf); } memcpy(mybuf, buf, count); big2uni(mybuf, &icount, 0); diff --git a/mbbsd/dark.c b/mbbsd/dark.c index 475fc302..f19184dc 100644 --- a/mbbsd/dark.c +++ b/mbbsd/dark.c @@ -466,7 +466,7 @@ main_dark(int fd, userinfo_t * uin) } } if (currutmp->turn == 1) { - sint go_on; + sint go_on = 0; if (uin->turn == 'g') { dd.cont = 1; uin->turn = (currutmp->turn) ? 0 : 1; diff --git a/mbbsd/edit.c b/mbbsd/edit.c index f5c94154..7de45c7c 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -237,7 +237,7 @@ int fix_cursor(char *str, int pos, unsigned int dir) for(newpos = 0; *str != '\0' && - (w = mchar_len(str), + (w = mchar_len((unsigned char*)str), newpos + 1 + (dir & (w - 1))) <= pos; str += w, newpos += w) ; @@ -2097,7 +2097,7 @@ display_textline_internal(textline_t *p, int i, int min, int max) outs(ANSI_COLOR(1) "<" ANSI_RESET); pdata++; } - (*output)(pdata); + (*output)((char*)pdata); } } else diff --git a/mbbsd/menu.c b/mbbsd/menu.c index a802713d..32c27da9 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -214,7 +214,7 @@ show_menu(const commands_t * p) } -static enum { +enum { M_ADMIN = 0, M_AMUSE, M_CHC, M_JCEE, M_MAIL, M_MMENU, M_NMENU, M_PMENU, M_PSALE, M_SREG, M_TMENU, M_UMENU, M_XMENU, }; diff --git a/mbbsd/var.c b/mbbsd/var.c index e0e5eccc..a52f7757 100644 --- a/mbbsd/var.c +++ b/mbbsd/var.c @@ -409,7 +409,7 @@ char msg_occupied = 0; /* gomo.c */ const char * const bw_chess[] = {"○", "●"}; -const unsigned char * const pat_gomoku /* [1954] */ = +const unsigned char * const pat_gomoku /* [1954] */ =(unsigned char*) /* 0 */ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" /* 16 */ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x55\xcc\x00\x00\x00\x00" /* 32 */ "\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x44\x00\x33\x00\x00\x00" @@ -534,7 +534,7 @@ const unsigned char * const pat_gomoku /* [1954] */ = /* 1936 */ "\x5a\xcc\x05\x05\x05\x05\x05\x05\x05\x06\x05\x05\x05\x0a\x05\x0a" /* 1952 */ "\x0a"; -const unsigned char * const adv_gomoku /* [978] */ = +const unsigned char * const adv_gomoku /* [978] */ = (unsigned char*) /* 0 */ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" /* 16 */ "\x00\x00\x00\x00\xa0\x00\xa0\x00\x04\x00\x04\x00\x00\xd0\x00\xd0" /* 32 */ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -- cgit v1.2.3