From dc2395e403af70aa488f3d944c9ba8ddee95c1e1 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> Date: Thu, 28 Aug 2003 08:50:12 +0000 Subject: warning free git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1138 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/admin.c | 4 ++-- mbbsd/announce.c | 2 +- mbbsd/mail.c | 2 +- mbbsd/record.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/admin.c b/mbbsd/admin.c index ccc3fe89..99c87621 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -1,4 +1,4 @@ -/* $Id: admin.c,v 1.44 2003/06/28 08:51:14 kcwu Exp $ */ +/* $Id$ */ #include "bbs.h" /* 使用者管理 */ @@ -1083,7 +1083,7 @@ give_id_money(char *user_id, int money, FILE * log_fp, char *mail_title, time_t prints("id:%s money:%d 不對吧!!", user_id, money); pressanykey(); } else { - fprintf(log_fp, "%ld %s %d", t, user_id, money); + fprintf(log_fp, "%d %s %d", (int)t, user_id, money); snprintf(tt, sizeof(tt), "%s : %d ptt 幣", mail_title, money); mail_id(user_id, tt, "~bbs/etc/givemoney.why", "[PTT 銀行]"); } diff --git a/mbbsd/announce.c b/mbbsd/announce.c index 4dc5438e..c8f69baf 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -438,7 +438,7 @@ static int a_pastetagpost(menu_t * pm, int mode) { fileheader_t fhdr; - boardheader_t *bh; + boardheader_t *bh = NULL; int ans = 0, ent = 0, tagnum; char title[TTLEN + 1] = "◇ "; char dirname[200], buf[200]; diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 52c8884c..84fa9c3e 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -1514,7 +1514,7 @@ bsmtp(char *fpath, char *title, char *rcpt, int method) /* stamp the queue file */ strlcpy(buf, "out/", sizeof(buf)); for (;;) { - snprintf(buf + 4, sizeof(buf) - 4, "M.%ld.A", ++chrono); + snprintf(buf + 4, sizeof(buf) - 4, "M.%d.A", (int)++chrono); if (!dashf(buf)) { Link(fpath, buf); break; diff --git a/mbbsd/record.c b/mbbsd/record.c index e16b9404..55f78787 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -477,7 +477,7 @@ stampfile(char *fpath, fileheader_t * fh) while (*(++ip)); *ip++ = '/'; do { - sprintf(ip, "M.%ld.A.%3.3X", ++dtime, rand() & 0xFFF); + sprintf(ip, "M.%d.A.%3.3X", (int)++dtime, rand() & 0xFFF); if (fp == -1 && errno != EEXIST) return -1; } while ((fp = open(fpath, O_CREAT | O_EXCL | O_WRONLY, 0644)) == -1); @@ -503,7 +503,7 @@ stampdir(char *fpath, fileheader_t * fh) while (*(++ip)); *ip++ = '/'; do { - sprintf(ip, "D%lX", ++dtime & 07777); + sprintf(ip, "D%X", (int)++dtime & 07777); } while (mkdir(fpath, 0755) == -1); memset(fh, 0, sizeof(fileheader_t)); strlcpy(fh->filename, ip, sizeof(fh->filename)); @@ -525,7 +525,7 @@ stamplink(char *fpath, fileheader_t * fh) while (*(++ip)); *ip++ = '/'; do { - sprintf(ip, "S%lX", ++dtime); + sprintf(ip, "S%X", (int)++dtime); } while (symlink("temp", fpath) == -1); memset(fh, 0, sizeof(fileheader_t)); strlcpy(fh->filename, ip, sizeof(fh->filename)); -- cgit v1.2.3