@@ -90,14 +90,14 @@ static zend_object_handlers random_randomizer_object_handlers;
9090
9191static inline uint32_t rand_range32 (const php_random_algo * algo , php_random_status * status , uint32_t umax )
9292{
93- uint32_t result , limit , r ;
93+ uint32_t result , limit ;
9494 size_t total_size = 0 ;
9595 uint32_t count = 0 ;
9696
9797 result = 0 ;
9898 total_size = 0 ;
9999 do {
100- r = algo -> generate (status );
100+ uint32_t r = algo -> generate (status );
101101 result = result | (r << (total_size * 8 ));
102102 total_size += status -> last_generated_size ;
103103 if (EG (exception )) {
@@ -132,7 +132,7 @@ static inline uint32_t rand_range32(const php_random_algo *algo, php_random_stat
132132 result = 0 ;
133133 total_size = 0 ;
134134 do {
135- r = algo -> generate (status );
135+ uint32_t r = algo -> generate (status );
136136 result = result | (r << (total_size * 8 ));
137137 total_size += status -> last_generated_size ;
138138 if (EG (exception )) {
@@ -146,14 +146,14 @@ static inline uint32_t rand_range32(const php_random_algo *algo, php_random_stat
146146
147147static inline uint64_t rand_range64 (const php_random_algo * algo , php_random_status * status , uint64_t umax )
148148{
149- uint64_t result , limit , r ;
149+ uint64_t result , limit ;
150150 size_t total_size = 0 ;
151151 uint32_t count = 0 ;
152152
153153 result = 0 ;
154154 total_size = 0 ;
155155 do {
156- r = algo -> generate (status );
156+ uint64_t r = algo -> generate (status );
157157 result = result | (r << (total_size * 8 ));
158158 total_size += status -> last_generated_size ;
159159 if (EG (exception )) {
@@ -188,7 +188,7 @@ static inline uint64_t rand_range64(const php_random_algo *algo, php_random_stat
188188 result = 0 ;
189189 total_size = 0 ;
190190 do {
191- r = algo -> generate (status );
191+ uint64_t r = algo -> generate (status );
192192 result = result | (r << (total_size * 8 ));
193193 total_size += status -> last_generated_size ;
194194 if (EG (exception )) {
0 commit comments