From 5576dd55cfc4a6843341f3cc8c2293a616889bf0 Mon Sep 17 00:00:00 2001 From: piaip Date: Tue, 11 Mar 2008 04:01:46 +0000 Subject: - eliminate compile warnings git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3991 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chc.c | 2 +- mbbsd/mbbsd.c | 2 +- mbbsd/pfterm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/chc.c b/mbbsd/chc.c index 82087703..602fc37e 100644 --- a/mbbsd/chc.c +++ b/mbbsd/chc.c @@ -949,7 +949,7 @@ chc_replay(FILE* fp) /* /\[(Red|Black) "([a-zA-Z0-9]+)"\]/; $2 */ userec_t rec; char *userid; - char *strtok_pos; + char *strtok_pos = NULL; ChessUser *user = (buf[1] == 'R' ? &info->user1 : &info->user2); diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 5dbfe95f..8f62ad7e 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1819,7 +1819,7 @@ static int check_banip(char *host) { unsigned int thisip = 0; char *ptr, *myhost = strdup(host); - char *strtok_pos; + char *strtok_pos = NULL; for( ptr = strtok_r(myhost, ".", &strtok_pos) ; ptr != NULL ; ptr = strtok_r(NULL, ".", &strtok_pos) ) thisip = thisip * 256 + atoi(ptr); diff --git a/mbbsd/pfterm.c b/mbbsd/pfterm.c index 32df0324..bffb225b 100644 --- a/mbbsd/pfterm.c +++ b/mbbsd/pfterm.c @@ -1489,7 +1489,7 @@ fterm_exec(void) { ftchar cmd = ft.cmd[ft.szcmd-1]; char *p = (char*)ft.cmd + 2; // ESC [ - int n = -1, x, y; + int n = -1, x = -1, y; ft.cmd[ft.szcmd] = 0; -- cgit v1.2.3