Pour obtenir une clé
d'essai remplissez le formulaire ci-dessous
Demandez des tariffs
Nouvelle licence
Renouvellement de licence
--Sélectionnez la devise--
USD
EUR
RUB
* En cliquant sur ce bouton, vous acceptez notre politique de confidentialité

Free PVS-Studio license for Microsoft MVP specialists
To get the licence for your open-source project, please fill out this form
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

I am interested to try it on the platforms:
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

Votre message a été envoyé.

Nous vous répondrons à


Si vous n'avez toujours pas reçu de réponse, vérifiez votre dossier
Spam/Junk et cliquez sur le bouton "Not Spam".
De cette façon, vous ne manquerez la réponse de notre équipe.

>
>
>
Examples of errors detected by the V637…

Examples of errors detected by the V637 diagnostic

V637. Use of two opposite conditions. The second condition is always false.


OpenCV

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 195, 197. keypoint.cpp 195


void KeyPointsFilter::retainBest(
  vector<KeyPoint>& keypoints, int n_points)
{
  ....
  if( n_points > 0 && keypoints.size() > (size_t)n_points )
  {
    if (n_points==0)
    {
      keypoints.clear();
      return;
    }
  ....
}

Chromium

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 500, 501. web_request_api_helpers.cc 500


static void ParseRequestCookieLine(
    const std::string& header_value,
    ParsedRequestCookies* parsed_cookies)
{
  std::string::const_iterator i = header_value.begin();
  ....
  if (*i == '"') {
    while (i != header_value.end() && *i != '"') ++i;
  ....
}

TinyCAD

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 86, 90. paint.cpp 86


void CTinyCadView::OnDraw(CDC* pDC)
{
  ....
  // Is any of this region in the off-page area?
  if (!pDC->IsPrinting())
  {
    // Paint the region white
    if (pDC->IsPrinting())
    {
      dc.SelectBrush(cWHITE);
      dc.SelectPen(PS_SOLID, 1, cWHITE);
    }
  ....
}

VirtualDub

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 183, 184. VirtualDub backface.cpp 183


void VDBackfaceService::Execute(
  IVDBackfaceStream& out, char *s)
{
  ....
  if (*s == '"') {
    while(*s && *s != '"')
      ++s;
  } else {
  ....
}

Unreal Engine 4

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 310, 312. propertystruct.cpp 310


const TCHAR* UStructProperty::ImportText_Internal(....) const
{
  ....
  if (*Buffer == TCHAR('\"'))                     // <=
  {
    while (*Buffer &&
           *Buffer != TCHAR('\"') &&              // <=
           *Buffer != TCHAR('\n') &&
           *Buffer != TCHAR('\r'))
    {
      Buffer++;
    }

    if (*Buffer != TCHAR('\"'))
  ....
}

TortoiseGit

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 2464, 2466. TortoiseGitMerge mergeinfo.c 2464


svn_error_t *
svn_mergeinfo__adjust_mergeinfo_rangelists(....)
{
  ....
  if (range->start + offset > 0 && range->end + offset > 0)
  {
    if (range->start + offset < 0)
      range->start = 0;
    else
      range->start = range->start + offset;

    if (range->end + offset < 0)
      range->end = 0;
    else
      range->end = range->end + offset;
  ....
}

K Desktop Environment

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 410, 412. kebsearchline.cpp 410


void
KViewSearchLine::slotColumnsRemoved(const QModelIndex &,
                                    int first, int last)
{
  if(d->treeView)
    updateSearch();
  else
  {
    if(d->listView->modelColumn() >= first &&
       d->listView->modelColumn() <= last)
    {
      if(d->listView->modelColumn()>last)   // <=
        kFatal()<<"...."<<endl;
      updateSearch();
    }
  }
}

.NET CoreCLR

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 31825, 31827. cee_wks gc.cpp 31825


void gc_heap::verify_heap (BOOL begin_gc_p)
{
  ....
  if (brick_table [curr_brick] < 0)
  {
    if (brick_table [curr_brick] == 0)
    {
      dprintf(3, ("curr_brick %Ix for object %Ix set to 0",
              curr_brick, (size_t)curr_object));
      FATAL_GC_ERROR();
    }
    ....
  }
  ....
}

Similar errors can be found in some other places:

  • V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 2898, 2900. daccess nidump.cpp 2898
  • V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 337, 339. utilcode prettyprintsig.cpp 337
  • V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 774, 776. utilcode prettyprintsig.cpp 774

ReactOS

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 2532, 2535. devinst.c 2532


HDEVINFO WINAPI SetupDiGetClassDevsExW(....)
{
  ....
  if (flags & DIGCF_ALLCLASSES)
  {
    ....
  }
  else if (!IsEqualIID(&list->ClassGuid, &GUID_NULL))// <=
  {
    if (IsEqualIID(&list->ClassGuid, &GUID_NULL))    // <=
          pClassGuid = &list->ClassGuid;
    ....
  }
  ....
}

Firebird

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 778, 780. jrd.cpp 778


void Trigger::compile(thread_db* tdbb)
{
  SET_TDBB(tdbb);

  Database* dbb = tdbb->getDatabase();
  Jrd::Attachment* const att = tdbb->getAttachment();

  if (extTrigger)
    return;

  if (!statement /*&& !compile_in_progress*/)
  {
    if (statement)
      return;
    ....
  }
}

Blender

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 938, 939. editcurve_select.c 938


static int select_less_exec(....)
{
  ....
  if ((lastsel==0)&&(bp->hide==0)&&(bp->f1 & SELECT)){
   if (lastsel != 0) sel = 1;
   else sel = 0;
  ....
  }
  ....
}

LibreOffice

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 281, 285. authfld.cxx 281


sal_uInt16  SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
{
  ....
  SwTOXSortTabBase* pOld = aSortArr[i].get();
  if(*pOld == *pNew)
  {
    //only the first occurrence in the document
    //has to be in the array
    if(*pOld < *pNew)
      pNew.reset();
    else // remove the old content
      aSortArr.erase(aSortArr.begin() + i);
    break;
  }
  ....
}

Similar errors can be found in some other places:

  • V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 1827, 1829. doctxm.cxx 1827

MuseScore

V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 4439, 4440. exportxml.cpp 4439


virtual Fraction tick() const override { return _tick; }

void ExportMusicXml::hairpin(....)
{
  ....
  if (hp->tick() != tick) {
        writeHairpinText(_xml, hp, hp->tick() == tick);
  }
  ....
}

Unicorn with delicious cookie
Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter