com php-src: Fixed Bug #70797 (Error while making PHP7): ext/hash/hash_sha3.c

From: Date: Tue, 27 Oct 2015 02:06:22 +0000
Subject: com php-src: Fixed Bug #70797 (Error while making PHP7): ext/hash/hash_sha3.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89536@lists.php.net to get a copy of this message
Commit: 69beb29e158a5658217a591c64cbb05f96df1d0c Author: Xinchen Hui <laruence@gmail.com> Tue, 27 Oct 2015 10:05:55 +0800 Parents: a685c53d3448794c232d8bccab3df2f0a342a32b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=69beb29e158a5658217a591c64cbb05f96df1d0c Log: Fixed Bug #70797 (Error while making PHP7) error: ‘for’ loop initial declarations are only allowed in C99 mode Bugs: https://bugs.php.net/70797 Changed paths: M ext/hash/hash_sha3.c Diff: diff --git a/ext/hash/hash_sha3.c b/ext/hash/hash_sha3.c index 0f01f16..0ff73e5 100644 --- a/ext/hash/hash_sha3.c +++ b/ext/hash/hash_sha3.c @@ -38,21 +38,24 @@ static inline unsigned char idx(unsigned char x, unsigned char y) { #ifdef WORDS_BIGENDIAN static inline php_hash_uint64 load64(const unsigned char* x) { + unsigned char i; php_hash_uint64 ret = 0; - for (unsigned char i = 7; i >= 0; --i) { + for (i = 7; i >= 0; --i) { ret <<= 8; ret |= x[i]; } return ret; } static inline void store64(const unsigned char* x, php_hash_uint64 val) { - for (unsigned char i = 0; i < 8; ++i) { + unsigned char i; + for (i = 0; i < 8; ++i) { x[i] = val & 0xFF; val >>= 8; } } static inline void xor64(const unsigned char* x, php_hash_uint64 val) { - for (unsigned char i = 0; i < 8; ++i) { + unsigned char i; + for (i = 0; i < 8; ++i) { x[i] ^= val & 0xFF; val >>= 8; }

« previous php.cvs (#89536) next »