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

Examples of errors detected by the V631 diagnostic

V631. Defining absolute path to file or directory is considered a poor coding style. Consider inspecting the 'Foo' function call.


ffdshow

V631 Consider inspecting the 'fopen' function call. Defining an absolute path to the file or directory is considered a poor style. writersink.cpp 13


STDMETHODIMP TmyWriterSink::OnHeader(INSSBuffer *pHeader)
{
  if (!f) f=fopen("c:\\2.wmv","wb");
  BYTE *buf; DWORD len;
  pHeader->GetBufferAndLength(&buf,&len);
  fwrite(buf,1,len,f);
  return S_OK;
}

Even if this was written just for the purpose of debugging, you'd better not do it that way. Other programmers may have troubles working with it.


NetXMS

V631 Consider inspecting the 'CreateFileW' function call. Defining an absolute path to the file or directory is considered a poor style. netxmsd.cpp 126


static void CreateMiniDump(DWORD pid)
{
  ....
  hFile = CreateFile(
    _T("C:\\netxmsd.mdmp"), GENERIC_WRITE, 0, NULL,
    CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);

  ....
}

VirtualDub

V631 Consider inspecting the 'LoadLibraryA' function call. Defining an absolute path to the file or directory is considered a poor style. VirtualDub leaks.cpp 67


VDDbgHelpDynamicLoaderW32::VDDbgHelpDynamicLoaderW32()
{
  hmodDbgHelp = LoadLibrary(
    "c:\\program files\\debugging tools for windows\\dbghelp");
  if (!hmodDbgHelp) {
    hmodDbgHelp = LoadLibrary("c:\\program files (x86)\\......
  ....
}

Similar errors can be found in some other places:

  • V631 Consider inspecting the 'LoadLibraryA' function call. Defining an absolute path to the file or directory is considered a poor style. VirtualDub leaks.cpp 69

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