From 2dc136d20bd5963cc7827f1383c45d7ff62f2738 Mon Sep 17 00:00:00 2001 From: in2 Date: Sat, 2 Nov 2002 11:02:44 +0000 Subject: warning free git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@550 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/BM_money.c | 3 ++- util/birth.c | 1 + util/horoscope.c | 3 ++- util/indexuser.c | 8 +++++--- util/jungo.c | 3 ++- util/openticket.c | 3 ++- util/reaper.c | 3 ++- util/toplazyBBM.c | 3 ++- util/toplazyBM.c | 3 ++- util/topusr.c | 4 ++-- util/userlist.c | 4 ++-- util/util_passwd.c | 4 ++-- util/util_record.c | 3 ++- util/yearsold.c | 4 ++-- 14 files changed, 30 insertions(+), 19 deletions(-) diff --git a/util/BM_money.c b/util/BM_money.c index db7b1538..e2ed960f 100644 --- a/util/BM_money.c +++ b/util/BM_money.c @@ -1,7 +1,8 @@ -/* $Id: BM_money.c,v 1.5 2002/06/19 13:38:01 lwms Exp $ */ +/* $Id: BM_money.c,v 1.6 2002/11/02 11:02:44 in2 Exp $ */ /* 給板主錢的程式 */ +#define _UTIL_C_ #include "bbs.h" #define FUNCTION (2100 - c*5) diff --git a/util/birth.c b/util/birth.c index 5c13c54f..23272d6f 100644 --- a/util/birth.c +++ b/util/birth.c @@ -1,5 +1,6 @@ /* 壽星程式 96 10/11 */ +#define _UTIL_C_ #include "bbs.h" #define OUTFILE BBSHOME "/etc/birth.today" diff --git a/util/horoscope.c b/util/horoscope.c index f1183591..53d69e31 100644 --- a/util/horoscope.c +++ b/util/horoscope.c @@ -1,4 +1,5 @@ -/* $Id: horoscope.c,v 1.2 2002/06/06 21:34:14 in2 Exp $ */ +/* $Id: horoscope.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */ +#define _UTIL_C_ #include "bbs.h" struct userec_t cuser; diff --git a/util/indexuser.c b/util/indexuser.c index 3668269a..8b39fdd0 100644 --- a/util/indexuser.c +++ b/util/indexuser.c @@ -1,3 +1,5 @@ +/* $Id: indexuser.c,v 1.5 2002/11/02 11:02:44 in2 Exp $ */ +#define _UTIL_C_ #include "bbs.h" #define INDEXPATH BBSHOME"/index" @@ -36,17 +38,17 @@ int main() if(u.realname[0]) { sprintf(buf,INDEXPATH"/realname/%X",string_hash(u.realname)); - append_record(buf, &j, sizeof(j)); + append_record(buf, (fileheader_t*)&j, sizeof(j)); } if(u.email[0]) { sprintf(buf,INDEXPATH"/email/%X",string_hash(u.email)); - append_record(buf, &j, sizeof(j)); + append_record(buf, (fileheader_t*)&j, sizeof(j)); } if(u.ident[0]) { sprintf(buf,INDEXPATH"/ident/%X",string_hash(u.ident)); - append_record(buf, &j, sizeof(j)); + append_record(buf, (fileheader_t*)&j, sizeof(j)); } } return 0; diff --git a/util/jungo.c b/util/jungo.c index 6221023b..4c7c2d94 100644 --- a/util/jungo.c +++ b/util/jungo.c @@ -1,4 +1,5 @@ -/* $Id: jungo.c,v 1.5 2002/06/19 13:38:01 lwms Exp $ */ +/* $Id: jungo.c,v 1.6 2002/11/02 11:02:44 in2 Exp $ */ +#define _UTIL_C_ #include "bbs.h" #define OUTFILE BBSHOME "/etc/toplazyBBM" diff --git a/util/openticket.c b/util/openticket.c index 643c55fb..55e04b0e 100644 --- a/util/openticket.c +++ b/util/openticket.c @@ -1,5 +1,6 @@ -/* $Id: openticket.c,v 1.8 2002/06/16 22:21:12 ptt Exp $ */ +/* $Id: openticket.c,v 1.9 2002/11/02 11:02:44 in2 Exp $ */ /* 開獎的 utility */ +#define _UTIL_C_ #include "bbs.h" static char *betname[8] = {"Ptt", "Jaky", "Action", "Heat", diff --git a/util/reaper.c b/util/reaper.c index d605bb70..9ed1b11f 100644 --- a/util/reaper.c +++ b/util/reaper.c @@ -1,4 +1,5 @@ -/* $Id: reaper.c,v 1.2 2002/06/06 21:34:14 in2 Exp $ */ +/* $Id: reaper.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */ +#define _UTIL_C_ #include "bbs.h" time_t now; diff --git a/util/toplazyBBM.c b/util/toplazyBBM.c index 076e6cc0..1b12eab9 100644 --- a/util/toplazyBBM.c +++ b/util/toplazyBBM.c @@ -1,4 +1,5 @@ -/* $Id: toplazyBBM.c,v 1.5 2002/06/19 13:38:01 lwms Exp $ */ +/* $Id: toplazyBBM.c,v 1.6 2002/11/02 11:02:44 in2 Exp $ */ +#define _UTIL_C_ #include "bbs.h" #define OUTFILE BBSHOME "/etc/toplazyBBM" diff --git a/util/toplazyBM.c b/util/toplazyBM.c index f54d7770..fc656817 100644 --- a/util/toplazyBM.c +++ b/util/toplazyBM.c @@ -1,4 +1,5 @@ -/* $Id: toplazyBM.c,v 1.16 2002/06/30 04:14:46 ptt Exp $ */ +/* $Id: toplazyBM.c,v 1.17 2002/11/02 11:02:44 in2 Exp $ */ +#define _UTIL_C_ #include "bbs.h" #define OUTFILE BBSHOME "/etc/toplazyBM" #define FIREFILE BBSHOME "/etc/firelazyBM" diff --git a/util/topusr.c b/util/topusr.c index 0f64777d..3b90a7e2 100644 --- a/util/topusr.c +++ b/util/topusr.c @@ -1,6 +1,6 @@ -/* $Id: topusr.c,v 1.2 2002/06/06 21:34:14 in2 Exp $ */ +/* $Id: topusr.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */ /* 使用者 上站記錄/文章篇數 排行榜 */ - +#define _UTIL_C_ #include "bbs.h" #define REAL_INFO diff --git a/util/userlist.c b/util/userlist.c index c8d53389..794a3daf 100644 --- a/util/userlist.c +++ b/util/userlist.c @@ -33,9 +33,9 @@ int main(int argc, char **argv) { f = &SHM->uinfo[i]; printf( - "%4d(%d) p[%d] i[%d] u[%s] n[%s] f[%s] m[%d] d[%d] t[%ld]\n", + "%4d(%d) p[%d] i[%d] u[%s] n[%s] f[%s] m[%d] t[%ld]\n", ++counter, i, f->pager, f->invisible, f->userid, - f->username, f->from, f->mode, f->mind, f->lastact); + f->username, f->from, f->mode, f->lastact); } printf("\nTotal: %d(%d)\n", counter, SHM->number); if(counter != SHM->number) { diff --git a/util/util_passwd.c b/util/util_passwd.c index c9fe4eac..17961d87 100644 --- a/util/util_passwd.c +++ b/util/util_passwd.c @@ -1,4 +1,4 @@ -/* $Id: util_passwd.c,v 1.2 2002/03/09 17:44:30 in2 Exp $ */ +/* $Id: util_passwd.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */ #include #include #include @@ -36,7 +36,7 @@ static userec_t *passwd_image = NULL; static int passwd_image_size; static int semid = -1; -int passwd_mmap() { +int passwd_mmap(void) { int fd; if(passwd_image!=NULL) return 0; diff --git a/util/util_record.c b/util/util_record.c index 8f1c9d02..98b6e43f 100644 --- a/util/util_record.c +++ b/util/util_record.c @@ -1,5 +1,6 @@ -/* $Id: util_record.c,v 1.2 2002/06/22 18:21:25 ptt Exp $ */ +/* $Id: util_record.c,v 1.3 2002/11/02 11:02:44 in2 Exp $ */ #include +#include #include #include #include diff --git a/util/yearsold.c b/util/yearsold.c index e0aa5142..93cb4a1b 100644 --- a/util/yearsold.c +++ b/util/yearsold.c @@ -1,6 +1,6 @@ -/* $Id: yearsold.c,v 1.3 2002/08/29 18:31:44 kcwu Exp $ */ +/* $Id: yearsold.c,v 1.4 2002/11/02 11:02:44 in2 Exp $ */ /* 站上年齡統計 */ - +#define _UTIL_C_ #include "bbs.h" #define MAX_LINE 16 -- cgit v1.2.3