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 :211044] Unchecked return value in tests/subsys/settings/fcb_init/src/settings_test_fcb_init.c #26358

Closed
zephyrbot opened this issue Jun 23, 2020 · 0 comments · Fixed by #27591
Assignees
Labels
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

@zephyrbot
Copy link
Collaborator

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/8e2c4a475dc375da6691175dd1da87525053ed76/tests/subsys/settings/fcb_init/src/settings_test_fcb_init.c#L129

Category: Error handling issues
Function: test_init_setup
Component: Tests
CID: 211044

Details:

123     void test_init_setup(void)
124     {
125         int err;
126    
127         test_prepare_storage();
128    
>>>     CID 211044:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "settings_subsys_init" without checking return value (as is done elsewhere 4 out of 5 times).
129         settings_subsys_init();
130    
131         err = settings_register(&c1_settings);
132         zassert_true(err == 0, "can't regsister the settings handler");
133    
134         err = settings_load();

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 Jun 23, 2020
nashif pushed a commit that referenced this issue Aug 16, 2020
Check the return value of settings_subsys_init() call.

Fixes #26358

Signed-off-by: David Leach <david.leach@nxp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants