Fixed several but not all warnings emitted by GCC 4.9.