Примеры ошибок, обнаруженных с помощью диагностики V684


V684. A value of variable is not modified. Consider inspecting the expression. It is possible that '1' should be present instead of '0'.


V8 JavaScript Engine

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


U_CFUNC int32_t U_CALLCONV
ucol_calcSortKey(....)
{
  ....
  if((caseBits & 0xC0) == 0) {
    *(cases-1) |= 1 << (--caseShift);
  } else {
    *(cases-1) |= 0 << (--caseShift);
  ....
}

Similar errors can be found in some other places:

  • 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 4948
  • V684 A value of the variable 'caseByte' is not modified. Consider inspecting the expression. It is possible that '1' should be present instead of '0'. ucol.cpp 6201
  • V684 A value of the variable 'caseByte' is not modified. Consider inspecting the expression. It is possible that '1' should be present instead of '0'. ucol.cpp 6212


Найденные ошибки

Проверено проектов
361
Собрано ошибок
13 417

А ты совершаешь ошибки в коде?

Проверь с помощью
PVS-Studio

Статический анализ
кода для C, C++, C#
и Java

goto PVS-Studio;