Re: cvs: php-src /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c mysqli_driver.c mysqli_prop.c /ext/pdo_mysql mysql_statement.c
| From: | Andrey Hristov | Date: | Wed, 20 May 2009 10:06:31 +0000 |
| Subject: | Re: cvs: php-src /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c mysqli_driver.c mysqli_prop.c /ext/pdo_mysql mysql_statement.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-58064@lists.php.net to get a copy of this message | ||
Hi,
Kalle Sommer Nielsen wrote:
kalle Wed May 20 08:29:23 2009 UTC- if (rc == (my_ulonglong)-1) { + if (rc == (long)-1) { This is not correct. Maybe you have 64bit box, but 32bit machines are still out there and this will be bad. my_ulonglong is 8 byte and -1, will be the max value 2^64-1, long is 4 byte and even when it is 8 byte, (long) -1 will be -1, not 2^64-1, so I think it would be better to revert these changes! Especially when the come after RC2 This is also wrong: - row_count = mysql_stmt_affected_rows(S->stmt); - if (row_count != (my_ulonglong)-1) { + row_count = (long) mysql_stmt_affected_rows(S->stmt); + if (row_count != (long)-1) { There are a few places where you have done the same mistake and they should be reverted. AndreyModified files: /php-src/ext/mysql php_mysql.c /php-src/ext/mysqli mysqli_api.c mysqli_driver.c mysqli_prop.c /php-src/ext/pdo_mysql mysql_statement.c Log:Fix compiler warnings in ext/mysql, ext/mysqli and ext/pdo_mysql