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

Examples of errors detected by the V563 diagnostic

V563. An 'else' branch may apply to the previous 'if' statement.


BCmenu

V563 It is possible that this 'else' branch must apply to the previous 'if' statement. fire bcmenu.cpp 1853


void BCMenu::InsertSpaces(void)
{
  if(IsLunaMenuStyle())
    if(!xp_space_accelerators)return;
  else
    if(!original_space_accelerators)return;
  ....
}

Most likely {} are missing.


Squirrel

V563 It is possible that this 'else' branch must apply to the previous 'if' statement. squirrel sqapi.cpp 756


SQRESULT sq_rawdeleteslot(HSQUIRRELVM v,
  SQInteger idx,SQBool pushval)
{
  ....
  if(pushval != 0)
    if(pushval) v->GetUp(-1) = t;
  else
    v->Pop(1);   // <=
  ....
}

The code "v->>Pop(1);" is never executed.


PeerBlock

V563 It is possible that this 'else' branch must apply to the previous 'if' statement. peerblock editlistproc.cpp 91


static void EditList_OnCommand(....)
{
  ....
  if(l=dynamic_cast<StaticList*>(*list))
    if(l->File!=file) {
      l->File=file;
      g_ret|=LISTS_NEEDRELOAD;
    }
  else {
    delete *list;
    *list=l=new StaticList;
    l->File=file;
    g_ret|=LISTS_NEEDRELOAD;
  }
  ....
}

Trans-Proteomic Pipeline

V563 It is possible that this 'else' branch must apply to the previous 'if' statement. Mascot2XML mascotconverter.cxx 895


void MascotConverter::init(....) {
  ....
  if(line_len > 8 && line[0] == 'r' && line[1] == 'e' &&
     line[2] == 'l' && line[3] == 'e' && line[4] == 'a' &&
     line[5] == 's' && line[6] == 'e' && line[7] == '=')
    if(database_ == NULL)
      database_ = strCopy(line+8);
  else if(line_len > 5 && line[0] == 'F' && line[1] == 'I' &&
          line[2] == 'L' && line[3] == 'E' && line[4] == '=') {
    header_ = strCopy(line+5);
  ....
}

Because there are no parentheses, else refers to another if.


Cfront

V563 It is possible that this 'else' branch must apply to the previous 'if' statement. error.c 164


int error(int t, loc* lc, char* s ...)
{
  ....
  if (in_error++)
    if (t!='t' || 4<in_error) {
      fprintf(stderr,"\nUPS!, error while handling error\n");
      ext(13);
    }
  else if (t == 't')
    t = 'i';
  ....
}

Open X-Ray Engine

V563 It is possible that this 'else' branch must apply to the previous 'if' statement. hit_memory_manager.cpp 368


void CHitMemoryManager::load    (IReader &packet)
{
  ....
  if (!spawn_callback || !spawn_callback->m_object_callback)
    if(!g_dedicated_server)
      Level().client_spawn_manager().add(
          delayed_object.m_object_id,m_object->ID(),callback);
#ifdef DEBUG
  else {
    if (spawn_callback && spawn_callback->m_object_callback) {
      VERIFY(spawn_callback->m_object_callback == callback);
    }
  }
#endif // DEBUG
}

Amnesia: The Dark Descent

V563 It is possible that this 'else' branch must apply to the previous 'if' statement. CharacterBody.cpp 1591


void iCharacterBody::CheckMoveCollision(....)
{
  ....
  /////////////////////////////////////
  //Forward velocity reflection
  //Make sure that new velocity points in the right direction
  //and that it is not too large!
  if(mfMoveSpeed[eCharDir_Forward] != 0)
  {
    vForwardVel = ....;
    float fForwardSpeed = vForwardVel.Length();
    if(mfMoveSpeed[eCharDir_Forward] > 0)
      if(mfMoveSpeed[eCharDir_Forward] > fForwardSpeed)
        mfMoveSpeed[eCharDir_Forward] = fForwardSpeed;
    else
      if(mfMoveSpeed[eCharDir_Forward] < fForwardSpeed)
        mfMoveSpeed[eCharDir_Forward] = -fForwardSpeed;
  }
  ....
}

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