Repository navigation
Handle Coverity issues - #12210
Merged
Merged
Handle Coverity issues#12210
Conversation
Nir-Az
approved these changes
Sep 19, 2023
Nir-Az
reviewed
Sep 19, 2023
| { | ||
| preset old_preset_values; | ||
| rs2_rs400_visual_preset old_preset; | ||
| preset old_preset_values{}; |
Collaborator
There was a problem hiding this comment.
Can you remind me the effect of it?
Without it , it will also call the default Ctor no?
Contributor
Author
There was a problem hiding this comment.
I don't think that this is a real issue, but I preferred to add this and not mark the issue as "not a bug" as I was already changing other issues in this file.
Reading the documentation, this issue is very confusing and have cyclic definitions. As I understand, preset is a struct so it will be "aggregate initialized". Each of its inner structs will be also "aggregate initialized" and the inner most fields "value initialized". Since they are native types they all should be initialized to static_cast( 0 ).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handle Coverity issues:
6053336 potential resource leak (unclosed file).
3413301, 3413347, 3413536, 3413541 dealing with potentially uninitialized variables.