summaryrefslogtreecommitdiffstats
path: root/mbbsd
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
commitdc2395e403af70aa488f3d944c9ba8ddee95c1e1 (patch)
tree4deb6735fc890d0fa22a72d2a669d6efce11fb0d /mbbsd
parent2c3e0a25796cf513b5bde805cc2c2dc369ab67f6 (diff)
downloadpttbbs-dc2395e403af70aa488f3d944c9ba8ddee95c1e1.tar
pttbbs-dc2395e403af70aa488f3d944c9ba8ddee95c1e1.tar.gz
pttbbs-dc2395e403af70aa488f3d944c9ba8ddee95c1e1.tar.bz2
pttbbs-dc2395e403af70aa488f3d944c9ba8ddee95c1e1.tar.lz
pttbbs-dc2395e403af70aa488f3d944c9ba8ddee95c1e1.tar.xz
pttbbs-dc2395e403af70aa488f3d944c9ba8ddee95c1e1.tar.zst
pttbbs-dc2395e403af70aa488f3d944c9ba8ddee95c1e1.zip
warning free
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1138 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/admin.c4
-rw-r--r--mbbsd/announce.c2
-rw-r--r--mbbsd/mail.c2
-rw-r--r--mbbsd/record.c6
4 files changed, 7 insertions, 7 deletions
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));