Fixes compilation of C sources on Linux

Also removes unused code according to compiler warnings