Some fixes for issues caught by cppcheck.

* Self-assignment.
* No error on zlib uncompress failure.
* Uninitialised data members
* Unnecessary code.