summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-20 00:18:17 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-20 00:18:17 +0800
commit0d4e404238bcbc37506c7c7f6a029ba37705c12f (patch)
tree8979a2b29f1bb2bdce9137411ef67cd4bcf0a8be /mbbsd
parent795d7da28a8514e8315643820badb86919da2e2e (diff)
downloadpttbbs-0d4e404238bcbc37506c7c7f6a029ba37705c12f.tar
pttbbs-0d4e404238bcbc37506c7c7f6a029ba37705c12f.tar.gz
pttbbs-0d4e404238bcbc37506c7c7f6a029ba37705c12f.tar.bz2
pttbbs-0d4e404238bcbc37506c7c7f6a029ba37705c12f.tar.lz
pttbbs-0d4e404238bcbc37506c7c7f6a029ba37705c12f.tar.xz
pttbbs-0d4e404238bcbc37506c7c7f6a029ba37705c12f.tar.zst
pttbbs-0d4e404238bcbc37506c7c7f6a029ba37705c12f.zip
fix strange syntax informed by gcc -W
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@639 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/edit.c4
-rw-r--r--mbbsd/read.c8
-rw-r--r--mbbsd/talk.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index f585fab8..dd8bb578 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1,4 +1,4 @@
-/* $Id: edit.c,v 1.26 2003/01/19 16:06:06 kcwu Exp $ */
+/* $Id: edit.c,v 1.27 2003/01/19 16:18:17 kcwu Exp $ */
#include "bbs.h"
typedef struct textline_t {
struct textline_t *prev;
@@ -42,7 +42,7 @@ static char fp_bak[] = "bak";
/* 記憶體管理與編輯處理 */
static void
-indigestion(i)
+indigestion(int i)
{
fprintf(stderr, "嚴重內傷 %d\n", i);
}
diff --git a/mbbsd/read.c b/mbbsd/read.c
index b926a852..5243a0cd 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.16 2003/01/17 08:16:21 kcwu Exp $ */
+/* $Id: read.c,v 1.17 2003/01/19 16:18:17 kcwu Exp $ */
#include "bbs.h"
#define MAXPATHLEN 256
@@ -164,6 +164,7 @@ int
TagPruner(int bid)
{
boardheader_t *bp;
+ assert(bid>0);
bp = getbcache(bid);
if (strcmp(bp->brdname, "Security") == 0)
return DONOTHING;
@@ -172,7 +173,6 @@ TagPruner(int bid)
return FULLUPDATE;
delete_range(currdirect, 0, 0);
TagNum = 0;
- if (bid > 0);
setbtotal(bid);
return NEWDIRECT;
}
@@ -452,8 +452,8 @@ select_read(keeploc_t * locmem, int sr_mode)
register char *tag, *query, *temp;
fileheader_t fh;
char fpath[80], genbuf[MAXPATHLEN], buf3[5];
- char static t_ans[TTLEN + 1] = "";
- char static a_ans[TTLEN + 1] = "";
+ static char t_ans[TTLEN + 1] = "";
+ static char a_ans[TTLEN + 1] = "";
int fd, fr, size = sizeof(fileheader_t);
struct stat st;
/* rocker.011018: make a reference number for process article */
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 2bc1ac53..60f2aa85 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.99 2003/01/16 11:58:04 kcwu Exp $ */
+/* $Id: talk.c,v 1.100 2003/01/19 16:18:17 kcwu Exp $ */
#include "bbs.h"
#define QCAST int (*)(const void *, const void *)
@@ -252,7 +252,7 @@ logout_friend_online(userinfo_t * utmp)
utmp->friend_online[i] = 0;
ui = &SHM->uinfo[j];
if (ui->pid && ui != utmp) {
- for (k = 0; k < ui->friendtotal > 0 && k < MAX_FRIEND &&
+ for (k = 0; k < ui->friendtotal && k < MAX_FRIEND &&
(int)(ui->friend_online[k] & 0xFFFFFF) != offset; k++);
if (k < ui->friendtotal) {
ui->friendtotal--;