fix mingw32 build error, fix gcc reports warning.