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 V620…

Examples of errors detected by the V620 diagnostic

V620. Expression of sizeof(T)*N kind is summed up with pointer to T type. Consider inspecting the expression.


Apache Xerces Project

V620 It's unusual that the expression of sizeof(T) kind is being subtracted from the pointer to T type. domnormalizer.cpp 277


const XMLCh *DOMNormalizer::integerToXMLCh(unsigned int i) const
{
  XMLCh *buf = (XMLCh*)
               fMemoryManager->allocate(15 * sizeof(XMLCh));
  XMLCh *pos = buf + sizeof(buf) - sizeof(XMLCh);
  ....
}

Snes9x

V620 It's unusual that the expression of sizeof(T) kind is being summed with the pointer to T type. wsnes9x.cpp 6145


typedef wchar_t TCHAR;

INT_PTR CALLBACK DlgOpenROMProc(....)
{
  ....
  TCHAR *tmp, *tmp2;
  ....
  while(tmp2=_tcsstr(tmp, TEXT("\\")))
    tmp=tmp2+sizeof(TCHAR);
  ....
}

Most likely this is what should be written here: tmp=tmp2+1;


Miranda NG

V620 It's unusual that the expression of sizeof(T)*N kind is being summed with the pointer to T type. Scriver input.cpp 387


BOOL HandleLinkClick(....)
{
  ....
  MoveMemory(tr.lpstrText + sizeof(TCHAR)* 7,
             tr.lpstrText,
             sizeof(TCHAR)*(tr.chrg.cpMax - tr.chrg.cpMin + 1));
  ....
}

Similar errors can be found in some other places:

  • V620 It's unusual that the expression of sizeof(T)*N kind is being summed with the pointer to T type. UInfoEx ctrl_edit.cpp 351

Chromium

V620 It's unusual that the expression of sizeof(T)*N kind is being summed with the pointer to T type. string_conversion.cc 62


int UTF8ToUTF16Char(const char *in,
                    int in_length,
                    uint16_t out[2])
{
  const UTF8 *source_ptr = reinterpret_cast<const UTF8 *>(in);
  const UTF8 *source_end_ptr = source_ptr + sizeof(char);
  uint16_t *target_ptr = out;
  uint16_t *target_end_ptr =
    target_ptr + 2 * sizeof(uint16_t); // <=
  out[0] = out[1] = 0;
  ....
}

Similar errors can be found in some other places:

  • V620 It's unusual that the expression of sizeof(T)*N kind is being summed with the pointer to T type. string_conversion.cc 106

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