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.
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!
LikeLike
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.
LikeLike
We would be glad if you mentioned PVS-Studio in your presentation.
LikeLike
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.
LikeLike