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

[Coverity CID :219545] Side effect in assertion in subsys/bluetooth/controller/ll_sw/ull_adv_aux.c #32904

Closed
zephyrbot opened this issue Mar 5, 2021 · 1 comment · Fixed by #35426
Assignees
Labels
area: Bluetooth Controller area: Bluetooth bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug
Milestone

Comments

@zephyrbot
Copy link
Collaborator

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/bd97359a5338b2542d19011b6d6aa1d8d1b9cc3f/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c#L1079

Category: Incorrect expression
Function: mfy_aux_offset_get
Component: Bluetooth
CID: 219545

Details:

LL_ASSERT(ret_cb == TICKER_STATUS_SUCCESS);

1073                 while (ret_cb == TICKER_STATUS_BUSY) {
1074                     ticker_job_sched(TICKER_INSTANCE_ID_CTLR,
1075                              TICKER_USER_ID_ULL_LOW);
1076                 }
1077             }
1078    
>>>     CID 219545:  Incorrect expression  (ASSERT_SIDE_EFFECT)
>>>     Argument "ret_cb" of LL_ASSERT() has a side effect because the variable is volatile.  The containing function might work differently in a non-debug build.
1079             LL_ASSERT(ret_cb == TICKER_STATUS_SUCCESS);
1080    
1081             LL_ASSERT((ticks_current == ticks_previous) || retry--);
1082    
1083             LL_ASSERT(id != TICKER_NULL);
1084         } while (id != ticker_id);

Please fix or provide comments in coverity using the link:

https://scan9.coverity.com/reports.htm#v32951/p12996.

Note: This issue was created automatically. Priority was set based on classification
of the file affected and the impact field in coverity. Assignees were set using the CODEOWNERS file.

@zephyrbot zephyrbot added bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug labels Mar 5, 2021
@github-actions
Copy link

github-actions bot commented May 5, 2021

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label May 5, 2021
@nashif nashif removed the Stale label May 5, 2021
@galak galak added this to the v2.6.0 milestone May 11, 2021
cvinayak added a commit to cvinayak/zephyr that referenced this issue May 19, 2021
Fix side effect in assertion when checking a volatile
variable inside assert check.

Fixes zephyrproject-rtos#32904, zephyrproject-rtos#32923.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
nashif pushed a commit that referenced this issue May 19, 2021
Fix side effect in assertion when checking a volatile
variable inside assert check.

Fixes #32904, #32923.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
cvinayak added a commit to cvinayak/zephyr that referenced this issue Aug 19, 2021
Fix side effect in assertion when checking a volatile
variable inside assert check.

Fixes zephyrproject-rtos#32904, zephyrproject-rtos#32923.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
cvinayak added a commit to cvinayak/zephyr that referenced this issue Nov 16, 2021
Fix side effect in assertion when checking a volatile
variable inside assert check.

Fixes zephyrproject-rtos#32904, zephyrproject-rtos#32923.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
carlescufi pushed a commit that referenced this issue Nov 18, 2021
Fix side effect in assertion when checking a volatile
variable inside assert check.

Fixes #32904, #32923.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Controller area: Bluetooth bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants