Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information