Fixed to compile on linux.
Fixed warnings for GCC and Clang.