Fix: remove for() loop initial declarations
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 6 Feb 2018 13:58:59 +0000 (08:58 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 6 Feb 2018 13:58:59 +0000 (08:58 -0500)
commit5a4d96d170a38f29bf147b84e248a47d45ee7d8e
treeeefb8c99e9e86063ab56dd44fbf1014e309d758c
parent101dace0dc164352c81cb347a7a0022aa84eabc6
Fix: remove for() loop initial declarations

Breaks sles12sp2 builds:

08:51:35 lttng-ust-fd-tracker.c: In function 'dup_std_fd':
08:51:35 lttng-ust-fd-tracker.c:174:2: error: 'for' loop initial
declarations are only allowed in C99 mode
08:51:35   for (int i = 0; i < STDERR_FILENO + 1; i++) {
08:51:35   ^
08:51:35 lttng-ust-fd-tracker.c:174:2: note: use option -std=c99 or
-std=gnu99 to compile your code
08:51:35 lttng-ust-fd-tracker.c:195:11: error: redefinition of 'i'
08:51:35   for (int i = 0; i < fd_to_close_count; i++) {
08:51:35            ^
08:51:35 lttng-ust-fd-tracker.c:174:11: note: previous definition of 'i'
was here
08:51:35   for (int i = 0; i < STDERR_FILENO + 1; i++) {
08:51:35            ^
08:51:35 lttng-ust-fd-tracker.c:195:2: error: 'for' loop initial
declarations are only allowed in C99 mode
08:51:35   for (int i = 0; i < fd_to_close_count; i++) {
08:51:35   ^
08:51:35 Makefile:412: recipe for target 'lttng-ust-fd-tracker.lo'
failed
08:51:35 make[2]: *** [lttng-ust-fd-tracker.lo] Error 1
08:51:35 make[2]: *** Waiting for unfinished jobs....

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-comm/lttng-ust-fd-tracker.c
This page took 0.024277 seconds and 4 git commands to generate.