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 :211478] Logically dead code in samples/net/sockets/big_http_download/src/big_http_download.c #26995

Closed
zephyrbot opened this issue Jul 20, 2020 · 1 comment
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix False positive Coverity identified issue that has been determined to be a false positive 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/476fc405e7/samples/net/sockets/big_http_download/src/big_http_download.c#L322

Category: Control flow issues
Function: main
Component: Samples
CID: 211478

Details:

316         const uint32_t total_iterations = num_iterations;
317         uint32_t current_iteration = 1;
318         do {
319             if (total_iterations == 0) {
320                 printf("\nIteration %u of INF\n", current_iteration);
321             } else {
>>>     CID 211478:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "printf("\nIteration %u of %...".
322                 printf("\nIteration %u of %u:\n",
323                     current_iteration, total_iterations);
324             }
325             download(res, is_tls);
326    
327             total_bytes += cur_bytes;

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 Jul 20, 2020
@pfalcon pfalcon added the False positive Coverity identified issue that has been determined to be a false positive label Jul 22, 2020
@pfalcon
Copy link
Contributor

pfalcon commented Jul 22, 2020

This is old false positive due to the fact that this code depends on Kconfig option. Resurfaced because that code was touched recently, re-marked as false positive.

@pfalcon pfalcon closed this as completed Jul 22, 2020
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 False positive Coverity identified issue that has been determined to be a false positive priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants