Skip to content

Conversation

@smokhov
Copy link
Contributor

@smokhov smokhov commented Dec 12, 2017

A recent commit 774570f introduced a compilation regression when compiling libfreenect and fakenect specifically on EL6 platforms, where it previously did not exist due to the introduced for(int i ..) declaration, which is also inconsistent with the rest of the code:

...
[ 83%] Building C object fakenect/CMakeFiles/fakenect.dir/fakenect.c.o
.../OpenISS/libfreenect/fakenect/fakenect.c: In function ‘freenect_init’:
.../OpenISS/libfreenect/fakenect/fakenect.c:532: error: ‘for’ loop initial declarations are only allowed in C99 mode
.../OpenISS/libfreenect/fakenect/fakenect.c:532: note: use option -std=c99 or -std=gnu99 to compile your code
make[2]: *** [fakenect/CMakeFiles/fakenect.dir/fakenect.c.o] Error 1
make[1]: *** [fakenect/CMakeFiles/fakenect.dir/all] Error 2
make: *** [all] Error 2

So this simple one-liner makes it all happy again.

@piedar
Copy link
Contributor

piedar commented Dec 12, 2017

Does your compiler support c99? I was considering converting the entire src/ directory to c99, but I have no stats on what compilers people use.

@piedar piedar added this to the v0.6.0 milestone Dec 12, 2017
@piedar piedar merged commit 34f7412 into OpenKinect:master Dec 12, 2017
@piedar
Copy link
Contributor

piedar commented Dec 12, 2017

Looks good for now. Let's use #539 for any discussion about the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants