Unicorn with delicious cookie
Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter
to the top
>
>
>
Examples of errors detected by the V690…

Examples of errors detected by the V690 diagnostic

V690. The class implements a copy constructor/operator=, but lacks the operator=/copy constructor.


Bitcoin

V690 The 'CKey' class implements a copy constructor, but lacks the the '=' operator. It is dangerous to use such a class. key.h 175


class CKey {
  ....
  // Copy constructor. This is necessary because of memlocking.
  CKey(const CKey &secret) : fValid(secret.fValid),
                             fCompressed(secret.fCompressed)
  {
    LockObject(vch);
    memcpy(vch, secret.vch, sizeof(vch));
  }
  ....
};

Similar errors can be found in some other places:

  • V690 The 'Semantic_actions' class implements the '=' operator, but lacks a copy constructor. It is dangerous to use such a class. json_spirit_reader_template.h 196
  • V690 The 'CFeeRate' class implements a copy constructor, but lacks the the '=' operator. It is dangerous to use such a class. core.h 118
  • V690 The 'CTransaction' class implements the '=' operator, but lacks a copy constructor. It is dangerous to use such a class. core.h 212
  • And 3 additional diagnostic messages.

Casablanca

V690 The '=' operator is declared as private in the '_acquire_protector' class, but the default copy constructor will still be generated by compiler. It is dangerous to use such a class. cpprestsdk140.uwp.staticlib fileio_winrt.cpp 825


struct _acquire_protector
{
  _acquire_protector(....);
  ~_acquire_protector();
  size_t   m_size;
private:
  _acquire_protector& operator=(const _acquire_protector&);
  uint8_t* m_ptr;
  concurrency::streams::streambuf<uint8_t>& m_buffer;
};

OpenJDK

V690 Copy constructor is declared as private in the 'ProductionState' class, but the default '=' operator will still be generated by compiler. It is dangerous to use such a class. dfa.cpp 76


class ProductionState {
  ....
private:
    // Disable public use of constructor, copy-ctor,  ...
  ProductionState( )                         :
  _production(cmpstr, hashstr, Form::arena)
  {  assert( false, "NotImplemented");  };
  ProductionState( const ProductionState & ) :
  _production(cmpstr, hashstr, Form::arena)
  {  assert( false, "NotImplemented");  }; // Deep-copy
};

Similar errors can be found in some other places:

  • V690 The 'MemRegion' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class. memRegion.hpp 43
  • V690 Copy constructor is declared as private in the 'Label' class, but the default '=' operator will still be generated by compiler. It is dangerous to use such a class. assembler.hpp 73

Tizen

V690 The 'SQLQueryPrivate' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class. SQLDatabaseImpl.h 26


class SQLQueryPrivate
{
public:
  std::weak_ptr<SQLDatabase> _db_ref;
  sqlite3 * _db;
  sqlite3_stmt * _stmt;
  bool _hasNext;
  std::string _query;

  SQLQueryPrivate(std::shared_ptr<SQLDatabase> db_ref,
                  sqlite3 * db, sqlite3_stmt * stmt,
                  const std::string& query);
  SQLQueryPrivate(const SQLQueryPrivate& other);
  ~SQLQueryPrivate();
};

SQLQueryPrivate::SQLQueryPrivate(const SQLQueryPrivate& other) :
    _db_ref(other._db_ref),
    _db(other._db),
    _stmt(other._stmt),
    _hasNext(other._hasNext),
    _query(other._query)
{
  const_cast<SQLQueryPrivate &>(other)._stmt = NULL;
}

Similar errors can be found in some other places:

  • V690 The 'BrowserImage' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class. BrowserImage.h 33
  • V690 The 'DownloadRequest' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class. download-manager-downloadRequest.h 30
  • V690 The 'CAudioError' class implements the '=' operator, but lacks a copy constructor. It is dangerous to use such a class. CAudioError.h 30
  • And 2 additional diagnostic messages.

close form

Remplissez le formulaire ci‑dessous en 2 étapes simples :

Vos coordonnées :

Étape 1
Félicitations ! Voici votre code promo !

Type de licence souhaité :

Étape 2
Team license
Enterprise licence
** En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité
close form
Demandez des tarifs
Nouvelle licence
Renouvellement de licence
--Sélectionnez la devise--
USD
EUR
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
La licence PVS‑Studio gratuit pour les spécialistes Microsoft MVP
close form
Pour obtenir la licence de votre projet open source, s’il vous plait rempliez ce formulaire
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
I want to join the test
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
check circle
Votre message a été envoyé.

Nous vous répondrons à


Si l'e-mail n'apparaît pas dans votre boîte de réception, recherchez-le dans l'un des dossiers suivants:

  • Promotion
  • Notifications
  • Spam