Fix gcc compiler error and warning.