fix issue 10405 - redundant "expression has no effect" error when
returning non-void in void function
Merge pull request #2210 from hpohl/10405

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