Skip to content

[Coverity CID :197606]Incorrect expression in /tests/kernel/common/src/irq_offload.c #15398

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

Closed
aasthagr opened this issue Apr 12, 2019 · 1 comment
Labels
area: Tests Issues related to a particular existing or missing test 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

Comments

@aasthagr
Copy link
Collaborator

Static code scan issues seen in File: /tests/kernel/common/src/irq_offload.c
Category: Incorrect expression
Function: test_irq_offload
Component: Tests
CID: 197606
Please fix or provide comments to square it off in coverity in the link: https://scan9.coverity.com/reports.htm#v32951/p12996

@aasthagr aasthagr added area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix labels Apr 12, 2019
@aasthagr
Copy link
Collaborator Author

*** CID 197606: Incorrect expression (ASSERT_SIDE_EFFECT)
/tests/kernel/common/src/irq_offload.c: 46 in test_irq_offload()
40 */
41 void test_irq_offload(void)
42 {
43 /*TESTPOINT: Offload to IRQ context/
44 irq_offload(offload_function, (void *)SENTINEL_VALUE);
45

CID 197606:  Incorrect expression  (ASSERT_SIDE_EFFECT)
Argument "sentinel" of z_zassert() has a side effect because the variable is volatile.  The containing function might work differently in a non-debug build.

46 zassert_equal(sentinel, SENTINEL_VALUE,
47 "irq_offload() didn't work properly");

@nashif nashif added the priority: low Low impact/importance bug label Apr 12, 2019
@nashif nashif closed this as completed Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Tests Issues related to a particular existing or missing test 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

No branches or pull requests

2 participants