fix build warnings on samples