rt-thread
rt-thread copied to clipboard
duo: cppcheck failed
[cpp_check.py 46 INFO] bsp/cvitek/drivers/drv_rtc.c:109:66: error: Signed integer overflow for expression '1<<31'. [integerOverflow]
value = mmio_read_32(rtc_base + CVI_RTC_SEC_PULSE_GEN) & ~(1 << 31);
^
bsp/cvitek/drivers/drv_rtc.c:112:62: error: Signed integer overflow for expression '1<<31'. [integerOverflow]
value = mmio_read_32(rtc_base + CVI_RTC_ANA_CALIB) & ~(1 << 31);
^
[cpp_check.py 46 INFO] bsp/cvitek/drivers/drv_spi.c:89:12: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit]
return ret;
^
bsp/cvitek/drivers/drv_spi.c:74:9: note: If condition 'ret' is true, the function will return/exit
if (ret)
^
bsp/cvitek/drivers/drv_spi.c:89:12: note: Returning identical expression 'ret'
return ret;
^