Skip to content

[Coverity CID: 236006] Structurally dead code in tests/subsys/logging/log_api/src/test.inc #35153

@zephyrbot

Description

@zephyrbot

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/0622bde3bf22926544c1aaef4c01dfa23d79f26e/tests/subsys/logging/log_api/src/test.inc#L553

Category: Control flow issues
Function: test_log_msg_dropped_notification
Component: Tests
CID: 236006

Details:

547              ztest_test_skip();
548      }
549     
550      uint32_t capacity = get_short_msg_capacity();
551     
552      return;
>>>     CID 236006:  Control flow issues  (UNREACHABLE)
>>>     This code cannot be reached: "log_setup(false);".
553      log_setup(false);
554     
555      log_n_messages(capacity, 0);
556     
557      /* Expect messages dropped when logger more than buffer capacity. */
558      log_n_messages(capacity + 1, 1);

Please fix or provide comments in coverity using the link:

https://scan9.coverity.com/reports.htm#v29271/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.

Metadata

Metadata

Assignees

Labels

CoverityA Coverity detected issue or its fixbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions