Fix compilation warnings in examples (#565).