correct cast to suppress gcc warning messages