Author :
Azat Khuzhin
Date :
2018-10-25 09:44:58
Hash :6f18f88e Message :Remove for loop initial declaration and fix conflicting type in it (gcc 4.8)
From [1]:
regress_buffer.c:742:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 1 << 16; ++i) {
^
regress_buffer.c:742:3: note: use option -std=c99 or -std=gnu99 to compile your code
regress_buffer.c:787:23: error: conflicting types for ‘bufread’
for (int n = toread, bufread = toread;
^
regress_buffer.c:717:51: note: previous definition of ‘bufread’ was here
size_t datalen = strlen(data), toread = datalen, bufread = 0;
^
regress_buffer.c:787:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int n = toread, bufread = toread;
^
[1]: https://travis-ci.org/azat/libevent/jobs/445501665