Indeed, that will also do it. It seems that using [void]Foo is the suggested solution on most questions about this on StackOverflow so I'll keep it as is. There are also other places in the tasks where I used this (not under code review).  