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

nimble/ll: Fix build with clang 11 on mac #1899

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Commits on Oct 29, 2024

  1. nimble/ll: Fix build with clang 11 on mac

    Looks like clang is not able to track relation between max_delay and
    calc_sch which are involve two separate if-else blocks.
    
    This is false positive.
    
    repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_sched.c:568:9:
        error: variable 'max_delay' is used uninitialized whenever 'if' condition
            is false [-Werror,-Wsometimes-uninitialized]
        if (calc_sch) {
            ^~~~~~~~
    repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_sched.c:586:35:
        note: uninitialized use occurs here
        rc = ble_ll_sched_insert(sch, max_delay, preempt_none);
                                      ^~~~~~~~~
    repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_sched.c:568:5:
        note: remove the 'if' if its condition is always true
        if (calc_sch) {
        ^~~~~~~~~~~~~~
    repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_sched.c:431:23:
        note: initialize the variable 'max_delay' to silence this warning
        uint32_t max_delay;
                          ^
                           = 0
    sjanc committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    206acce View commit details
    Browse the repository at this point in the history