Eliminating cppcheck warnings