Coverity fixes in examples