Skip to content

[Coverity CID :197600]Incorrect expression in /tests/lib/c_lib/src/main.c #15404

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
Closed
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/lib/c_lib/src/main.c
Category: Incorrect expression
Function: test_stddef
Component: Tests
CID: 197600
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
@nashif nashif added the priority: low Low impact/importance bug label Apr 12, 2019
@nashif
Copy link
Member

nashif commented Apr 12, 2019

/**
 79 *
 80 * @brief Test standard type definitions library
 81 *
 82 */
 83
 84void test_stddef(void)
 85{
 86
   	
CID 197600 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT)
assert_side_effect: Argument size_of_long_variable of z_zassert() has a side effect because the variable is volatile. The containing function might work differently in a non-debug build.
 87        zassert_true((size_of_long_variable == 4), "sizeof");
 88}
 89

@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