Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duo: cppcheck failed #8975

Open
unicornx opened this issue May 22, 2024 · 0 comments
Open

duo: cppcheck failed #8975

unicornx opened this issue May 22, 2024 · 0 comments

Comments

@unicornx
Copy link
Contributor

[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;
           ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant