Fix compiler warnings from GCC and Clang.