diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-15 19:12:48 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-15 19:12:48 +0800 |
commit | bee0621d20c4ff0ad165be128e1ab8c5b33168d7 (patch) | |
tree | 116cbfaddf3c7a30c2a0c1a2d1e6773cb3a55718 | |
parent | 7cb42a94fb0aa1c3fe242699a2bec79efe04f7e1 (diff) | |
download | pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.gz pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.bz2 pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.lz pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.xz pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.tar.zst pttbbs-bee0621d20c4ff0ad165be128e1ab8c5b33168d7.zip |
fix compile error & warning free
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1766 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | innbbsd/receive_article.c | 2 | ||||
-rw-r--r-- | mbbsd/record.c | 5 | ||||
-rw-r--r-- | mbbsd/user.c | 2 | ||||
-rw-r--r-- | util/merge_dir.c | 5 | ||||
-rw-r--r-- | util/shmctl.c | 2 |
5 files changed, 10 insertions, 6 deletions
diff --git a/innbbsd/receive_article.c b/innbbsd/receive_article.c index 586208d0..02e1832b 100644 --- a/innbbsd/receive_article.c +++ b/innbbsd/receive_article.c @@ -831,7 +831,7 @@ nolfilename(n, fpath) -int +static int delete_record(char *fpath, int size, int id) { nol my; diff --git a/mbbsd/record.c b/mbbsd/record.c index b11325d0..605f5417 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -128,6 +128,7 @@ substitute_record(char *fpath, void *rptr, int size, int id) } /* rocker.011022: 避免lock檔開啟時不正常斷線,造成永久lock */ +#ifndef _BBS_UTIL_C_ static int force_open(char *fname) { @@ -143,7 +144,7 @@ force_open(char *fname) return fd; } - +#endif /* new/old/lock file processing */ typedef struct nol_t { @@ -152,6 +153,7 @@ typedef struct nol_t { char lockfn[256]; } nol_t; +#ifndef _BBS_UTIL_C_ static void nolfilename(nol_t * n, char *fpath) { @@ -159,6 +161,7 @@ nolfilename(nol_t * n, char *fpath) snprintf(n->oldfn, sizeof(n->oldfn), "%s.old", fpath); snprintf(n->lockfn, sizeof(n->lockfn), "%s.lock", fpath); } +#endif int delete_records(char fpath[], int size, int id, int num) diff --git a/mbbsd/user.c b/mbbsd/user.c index 6245ef42..cd7f3b66 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -630,7 +630,7 @@ uinfo_query(userec_t * u, int real, int unum) "標題: [公安報告] 站長修改金錢報告\n" "時間: %s\n" " 站長\033[1;32m%s\033[m把\033[1;32m%s\033[m" - "的錢從\033[1;35m%ld\033[m改成\033[1;35m%d\033[m", + "的錢從\033[1;35m%d\033[m改成\033[1;35m%d\033[m", ctime(&now), cuser->userid, x.userid, money, x.money); clrtobot(); diff --git a/util/merge_dir.c b/util/merge_dir.c index 44fcd1f2..2b2fd85b 100644 --- a/util/merge_dir.c +++ b/util/merge_dir.c @@ -9,9 +9,10 @@ void usage() { fileheader_t *fh; -int dir_cmp(fileheader_t *a, fileheader_t *b) +int dir_cmp(const void *a, const void *b) { - return strncasecmp(a->filename, b->filename, 12); + return strncasecmp(((fileheader_t *)a)->filename, + ((fileheader_t *)b)->filename, 12); } int main(int argc, char **argv) { diff --git a/util/shmctl.c b/util/shmctl.c index 8b30c758..82778162 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -210,7 +210,6 @@ inline void utmpsort(int sortall) userinfo_t *uentp; int count, i, ns; short nusers[MAX_BOARD]; - boardheader_t *HBcache[HOTBOARDCACHE]; SHM->UTMPbusystate = 1; @@ -265,6 +264,7 @@ inline void utmpsort(int sortall) { #if HOTBOARDCACHE int k, r, last = 0, top = 0; + boardheader_t *HBcache[HOTBOARDCACHE]; #endif for (i = 0; i < SHM->Bnumber; ++i) if (SHM->bcache[i].brdname[0] != 0){ |