fix warning caused by void return statement