Results of code analysis made in PVS-Studio

Some good catches in that article :slight_smile: