Revert "Fix several cppcheck warnings."

This reverts commit 21cff3bca2055587f7a6a85a8cc7691111d43c50.