ICQ

A forgotten break statement

V519 The ‘voipProxySettings.type’ variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 171, 172. core im_container.cpp 172

void core::im_container::fromInternalProxySettings2Voip(....)
{
  ....
  switch (proxySettings.proxy_type_) {
  case 0:
    voipProxySettings.type = VoipProxySettings::kProxyType_Http;
  case 4:
    voipProxySettings.type = VoipProxySettings::kProxyType_Socks4;
  case 5:
    voipProxySettings.type = VoipProxySettings::kProxyType_Socks5;
  case 6:
    voipProxySettings.type = VoipProxySettings::kProxyType_Socks4a;
  default:
    voipProxySettings.type = VoipProxySettings::kProxyType_None;
  }  
  ....
}

The programmer totally forgot about the break statement in the process of writing the code. Regardless of the value of the variable proxySettings.proxy_type_ the result will always be the assignment:

voipProxySettings.type = VoipProxySettings::kProxyType_None;

Please click here to see more bugs from this project.

4 thoughts on “ICQ

  1. You really make it seem so easy with your presentation however I in finding this topic to be really one thing which I think I’d never understand. It kind of feels too complicated and very huge for me. I’m looking forward to your next submit, I will try to get the cling of it!

    Like

  2. Thanks for another magnificent article. Where else could anybody get that kind of information in such an ideal means of writing? I have a presentation subsequent week, and I am at the look for such information.

    Like

  3. I do agree with all of the ideas you have introduced on your post. They are very convincing and can definitely work. Still, the posts are too quick for beginners. May you please lengthen them a little from next time? Thank you for the post.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.