Bug #50800 [Opn->Csd]: Hashes use improper sign with L64 macro

From: Date: Sun, 30 Sep 2018 14:13:20 +0000
Subject: Bug #50800 [Opn->Csd]: Hashes use improper sign with L64 macro
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217312@lists.php.net to get a copy of this message
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)

« previous php.bugs (#217312) next »