fix issue 10405 - redundant "expression has no effect" error when
returning non-void in void function