HMI1001: fix build error, cleanup compiler warnings.