From d4a50542ead041f0fb73d337b414700b24231c9e Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 24 Aug 2011 10:15:47 +0000 Subject: Eliminated compile warning "comparison is always false due to limited range of data type" Fixed test failed due to mysql_pconnect throw warning Fixed test failed when host mysql server doesn't listen on 3306 --- ext/mysqlnd/mysqlnd_charset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_charset.c') diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c index 6792229d10..a87b2a1f4f 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -126,8 +126,8 @@ static unsigned int check_mb_utf8_sequence(const char *start, const char *end) if (!((start[1] ^ 0x80) < 0x40 && (start[2] ^ 0x80) < 0x40 && (start[3] ^ 0x80) < 0x40 && - (c >= 0xf1 || start[1] >= 0x90) && - (c <= 0xf3 || start[1] <= 0x8F))) + (c >= 0xf1 || start[1] >= (char)0x90) && + (c <= 0xf3 || start[1] <= (char)0x8F))) { return 0; /* invalid utf8 character */ } -- cgit v1.2.1