PVS-StudioWarnings

PVS-Studio warning V637 for Chromium

Nov 17th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. static void ParseRequestCookieLine(
  2.     const std::string& header_value,
  3.     ParsedRequestCookies* parsed_cookies)
  4. {
  5.   std::string::const_iterator i = header_value.begin();
  6.   ....
  7.   if (*i == '"') {
  8.     while (i != header_value.end() && *i != '"') ++i;
  9.   ....
  10. }
  11.  
  12. This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V637 Two opposite conditions were encountered. The second condition is always false. Check lines: 500, 501. web_request_api_helpers.cc 500
  15.  
  16. PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment