Remove compiler warning

Remove compiler warning about that not all return paths have a return value