Fixed various Cppcheck inconclusive warnings