PVS-StudioWarnings

PVS-Studio warning V684 for V8

Nov 20th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. U_CFUNC int32_t U_CALLCONV
  2. ucol_calcSortKey(....)
  3. {
  4.   ....
  5.   if((caseBits & 0xC0) == 0) {
  6.     *(cases-1) |= 1 << (--caseShift);
  7.   } else {
  8.     *(cases-1) |= 0 << (--caseShift);
  9.   ....
  10. }
  11.  
  12. This suspicious code was found in V8 project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V684 A value of the variable '* (cases - 1)' is not modified. Consider inspecting the expression. It is possible that '1' should be present instead of '0'. ucol.cpp 4941
  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