Fix several compiler warnings raised by GCC 4.7.