Skip to content

Commit 2c137d8

Browse files
authored
Fix invalid for loop initialization
This fixes an error when building with gcc-4.2 on Mac OS X 10.5, and is consistent with the rest of the for loop declarations in this file.
1 parent 51be27d commit 2c137d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎c/enc/encode.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ static void InitCommandPrefixCodes(BrotliOnePassArena* s) {
245245
static double EstimateEntropy(const uint32_t* population, size_t size) {
246246
size_t total = 0;
247247
double result = 0;
248-
for (size_t i = 0; i < size; ++i) {
248+
size_t i;
249+
for (i = 0; i < size; ++i) {
249250
uint32_t p = population[i];
250251
total += p;
251252
result += (double)p * FastLog2(p);

0 commit comments

Comments
 (0)