Fix coverity issues compaction_job, compaction_picker#3091
Closed
pdvian wants to merge 1 commit intofacebook:masterfrom
Closed
Fix coverity issues compaction_job, compaction_picker#3091pdvian wants to merge 1 commit intofacebook:masterfrom
pdvian wants to merge 1 commit intofacebook:masterfrom
Conversation
yiwu-arbug
reviewed
Dec 7, 2017
db/dbformat.h
Outdated
Contributor
There was a problem hiding this comment.
Can you revert the change for dbformat.h? As the comment said it is left uninitialized for speed, although I don't know how much difference there is.
Author
There was a problem hiding this comment.
@yiwu-arbug made the changes as requested. Kindly review the changes.
f51ab67 to
7cb27d0
Compare
Contributor
|
@pdvian has updated the pull request. |
Summary: db/compaction_job.cc: ReportStartedCompaction(compaction); CID 1419863 (facebook#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member bottommost_level_ is not initialized in this constructor nor in any functions that it calls. db/compaction_picker_universal.cc: 7struct InputFileInfo { 2. uninit_member: Non-static class member level is not initialized in this constructor nor in any functions that it calls. CID 1405355 (facebook#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 4. uninit_member: Non-static class member index is not initialized in this constructor nor in any functions that it calls. 38 InputFileInfo() : f(nullptr) {}
7cb27d0 to
9439ccf
Compare
Contributor
|
@pdvian has updated the pull request. |
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@yiwu-arbug has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Contributor
|
Merging. |
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@yiwu-arbug is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
Summary:
db/compaction_job.cc:
ReportStartedCompaction(compaction);
CID 1419863 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member bottommost_level_ is not initialized in this constructor nor in any functions that it calls.
db/compaction_picker_universal.cc:
7struct InputFileInfo {
2. uninit_member: Non-static class member level is not initialized in this constructor nor in any functions that it calls.
CID 1405355 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member index is not initialized in this constructor nor in any functions that it calls.
38 InputFileInfo() : f(nullptr) {}
db/dbformat.h:
ParsedInternalKey()
84 : sequence(kMaxSequenceNumber) // Make code analyzer happy
CID 1168095 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member type is not initialized in this constructor nor in any functions that it calls.
85 {} // Intentionally left uninitialized (for speed)