silence some warnings
Merge pull request #1336 from votjakovr/develop

Fix various errors and warnings detected by clang.