diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-10-17 01:05:46 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-10-17 01:05:46 +0800 |
commit | 7daae7397382c30de7a7851ffa1ded14969b1f76 (patch) | |
tree | 1e3ce2437fd33533ece4147e00190ff1a49ec3f2 /util | |
parent | 7e01ec5f042a6fd0897cf0ce00d3ba8815064dea (diff) | |
download | pttbbs-7daae7397382c30de7a7851ffa1ded14969b1f76.tar pttbbs-7daae7397382c30de7a7851ffa1ded14969b1f76.tar.gz pttbbs-7daae7397382c30de7a7851ffa1ded14969b1f76.tar.bz2 pttbbs-7daae7397382c30de7a7851ffa1ded14969b1f76.tar.lz pttbbs-7daae7397382c30de7a7851ffa1ded14969b1f76.tar.xz pttbbs-7daae7397382c30de7a7851ffa1ded14969b1f76.tar.zst pttbbs-7daae7397382c30de7a7851ffa1ded14969b1f76.zip |
* eliminate warnings
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3584 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/shmctl.c | 11 | ||||
-rw-r--r-- | util/xchatd.c | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/util/shmctl.c b/util/shmctl.c index 42ba9415..1b959eb1 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -66,7 +66,8 @@ int utmpfix(int argc, char **argv) int i, fast = 0, nownum = SHM->UTMPnumber; int which, nactive = 0, dofork = 1, daemonsleep = 0; time_t now; - char *clean, buf[1024]; + const char *clean; + char buf[1024]; IDLE_t idle[USHM_SIZE]; char changeflag = 0; time_t idletimeout = IDLE_TIMEOUT; @@ -571,7 +572,7 @@ int utmpnum(int argc, char **argv) return 0; } -char *GV2str[] = {"dymaxactive", "toomanyusers", +const char *GV2str[] = {"dymaxactive", "toomanyusers", "noonlineuser","now", "nWelcomes", "shutdown", NULL}; int showglobal(int argc, char **argv) { @@ -1088,7 +1089,7 @@ int showstat(int argc, char *argv[]) { int i; int flag_clear=0; - char *stat_desc[]={ + const char *stat_desc[]={ "STAT_LOGIN", "STAT_SHELLLOGIN", "STAT_VEDIT", @@ -1145,9 +1146,9 @@ int dummy(int argc, char *argv[]) return 0; } -struct { +struct Cmd { int (*func)(int, char **); - char *cmd, *descript; + const char *cmd, *descript; } cmd[] = { {dummy, "\b\b\b\bStart daemon:", ""}, {utmpsortd, "utmpsortd", "utmp sorting daemon"}, diff --git a/util/xchatd.c b/util/xchatd.c index 8e2373b5..d50e822d 100644 --- a/util/xchatd.c +++ b/util/xchatd.c @@ -294,7 +294,7 @@ static int valid_chatid(register char *id) { static int -str_equal(unsigned char *s1, unsigned char *s2) +str_equal(const char *s1, const char *s2) { return strcasecmp(s1, s2)==0; } @@ -312,7 +312,7 @@ str_equal(unsigned char *s1, unsigned char *s2) static int -str_match(unsigned char *s1, unsigned char *s2) +str_match(const char *s1, const char *s2) { register int c1, c2; @@ -1491,7 +1491,7 @@ login_user(ChatUser *cu, char *msg) char *userid; char *chatid; struct sockaddr_in from; - int fromlen; + unsigned int fromlen; struct hostent *hp; |