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


V602. Consider inspecting this expression. '<' possibly should be replaced with '<<'.


RT-Thread

V602 CWE-480 Consider inspecting the '(1U < 1)' expression. '<' possibly should be replaced with '<<'. fsl_aipstz.h 69


typedef enum _aipstz_peripheral_access_control {
  kAIPSTZ_PeripheralAllowUntrustedMaster = 1U,
  kAIPSTZ_PeripheralWriteProtected = (1U < 1),
  kAIPSTZ_PeripheralRequireSupervisor = (1U < 2),
  kAIPSTZ_PeripheralAllowBufferedWrite = (1U < 2)
} aipstz_peripheral_access_control_t;

Similar errors can be found in some other places:

  • V602 CWE-480 Consider inspecting the '(1U < 2)' expression. '<' possibly should be replaced with '<<'. fsl_aipstz.h 70
  • V602 CWE-480 Consider inspecting the '(1U < 2)' expression. '<' possibly should be replaced with '<<'. fsl_aipstz.h 71


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

Проверено проектов
346
Собрано ошибок
13 188

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

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

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

goto PVS-Studio;