Skip to content

Fix coverity issues compaction_job, compaction_picker#3091

Closed
pdvian wants to merge 1 commit intofacebook:masterfrom
pdvian:wip-fix-coverity-issues-1419852
Closed

Fix coverity issues compaction_job, compaction_picker#3091
pdvian wants to merge 1 commit intofacebook:masterfrom
pdvian:wip-fix-coverity-issues-1419852

Conversation

@pdvian
Copy link
Copy Markdown

@pdvian pdvian commented Oct 30, 2017

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)

db/dbformat.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yiwu-arbug made the changes as requested. Kindly review the changes.

@pdvian pdvian force-pushed the wip-fix-coverity-issues-1419852 branch from f51ab67 to 7cb27d0 Compare December 11, 2017 11:39
@facebook-github-bot
Copy link
Copy Markdown
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) {}
@pdvian pdvian force-pushed the wip-fix-coverity-issues-1419852 branch from 7cb27d0 to 9439ccf Compare December 11, 2017 11:50
@pdvian pdvian changed the title Fix coverity issues compaction_job, compaction_picker, dbformat Fix coverity issues compaction_job, compaction_picker Dec 11, 2017
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@pdvian has updated the pull request.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yiwu-arbug has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@yiwu-arbug
Copy link
Copy Markdown
Contributor

Merging.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yiwu-arbug is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants