summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author(no author) <(no author)@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-08-28 16:50:12 +0800
committer(no author) <(no author)@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-08-28 16:50:12 +0800
commitb2069ca40e9c7dc42ee8dd98c6d64558decef207 (patch)
tree9d5ebabf57170527e449e398239c29f08acb90cd
parent14a57a472a163fa51e7767329106054304dded26 (diff)
downloadpttbbs-b2069ca40e9c7dc42ee8dd98c6d64558decef207.tar
pttbbs-b2069ca40e9c7dc42ee8dd98c6d64558decef207.tar.gz
pttbbs-b2069ca40e9c7dc42ee8dd98c6d64558decef207.tar.bz2
pttbbs-b2069ca40e9c7dc42ee8dd98c6d64558decef207.tar.lz
pttbbs-b2069ca40e9c7dc42ee8dd98c6d64558decef207.tar.xz
pttbbs-b2069ca40e9c7dc42ee8dd98c6d64558decef207.tar.zst
pttbbs-b2069ca40e9c7dc42ee8dd98c6d64558decef207.zip
warning free
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@1138 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/admin.c4
-rw-r--r--pttbbs/mbbsd/announce.c2
-rw-r--r--pttbbs/mbbsd/mail.c2
-rw-r--r--pttbbs/mbbsd/record.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/pttbbs/mbbsd/admin.c b/pttbbs/mbbsd/admin.c
index ccc3fe89..99c87621 100644
--- a/pttbbs/mbbsd/admin.c
+++ b/pttbbs/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/pttbbs/mbbsd/announce.c b/pttbbs/mbbsd/announce.c
index 4dc5438e..c8f69baf 100644
--- a/pttbbs/mbbsd/announce.c
+++ b/pttbbs/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/pttbbs/mbbsd/mail.c b/pttbbs/mbbsd/mail.c
index 52c8884c..84fa9c3e 100644
--- a/pttbbs/mbbsd/mail.c
+++ b/pttbbs/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/pttbbs/mbbsd/record.c b/pttbbs/mbbsd/record.c
index e16b9404..55f78787 100644
--- a/pttbbs/mbbsd/record.c
+++ b/pttbbs/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));