Bug #50800 [Opn->Csd]: Hashes use improper sign with L64 macro
Edit report at https://bugs.php.net/bug.php?id=50800&edit=1
ID: 50800
Updated by: cmb@php.net
Reported by: philipp at redfish-solutions dot com
Summary: Hashes use improper sign with L64 macro
-Status: Open
+Status: Closed
Type: Bug
Package: Compile Warning
Operating System: linux 2.6.27.42
PHP Version: 5.2.12
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This should be fixed with commit 14caf17[1], available as of PHP
5.6.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=14caf174ff219376e4f1234bd297ffe973cc416e>
Previous Comments:
------------------------------------------------------------------------
[2010-01-19 17:09:46] philipp at redfish-solutions dot com
Description:
------------
The table:
static const php_hash_uint64 rc[R + 1] = {
...
L64(0xbd5d10f4cb3e0567),
...
uses unsigned data of 64-bit size, but it isn't declared as such. When the high bit is set, as
above, this causes warnings (or errors, if -Wall is present).
Reproduce code:
---------------
The fix is trivial. In the sequence:
#elif SIZEOF_LONG_LONG == 8
#define L64(x) x##LL
typedef unsigned long long php_hash_uint64;
for example, in ext/hash/php_hash_types.h, the macro should be written as:
#define L64(x) x##ULL
instead.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=50800&edit=1
Thread (2 messages)