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 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;
  }
  ....
}

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