Fixes compilation of C sources on Linux
Remove unused code according to compiler warnings