Examples of errors detected by the V730 diagnostic

V730. Not all members of a class are initialized inside the constructor.


Miranda IM

V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: nLockCount. - ADDITIONAL IN CURRENT utilities.h 130


struct lockable_struct: public void_struct
{
private:
  int nLockCount;
public:
  lockable_struct(): void_struct() { _Lock(); };
  virtual ~lockable_struct() {};

  void _Lock() { nLockCount++; };
  void _Release() { nLockCount--;
                    if (!nLockCount) delete this; };

  int getLockCount() { return nLockCount; };
};


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++ and C#

goto PVS-Studio;