build by cmake, fix type warning