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

librbd: address coverity false positives #17696

Merged
merged 1 commit into from Oct 3, 2017

Conversation

Projects
None yet
3 participants
@amitkumar50
Copy link
Contributor

commented Sep 13, 2017

Fixes the coverity issues:

** 1402627 Uninitialized scalar field

CID 1402627 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member promotion_state is not
initialized in this constructor nor in any functions that it calls.

** 1402630 Uninitialized scalar field

CID 1402630 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_promotion_state is not
initialized in this constructor nor in any functions that it calls.

** 1402631 Uninitialized scalar field

CID 1402631 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_promotion_state is not
initialized in this constructor nor in any functions that it calls.

** 1402632 Uninitialized scalar field

CID 1402632 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member tag_tid is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com

@joscollin
Copy link
Member

left a comment

Please do a local build success before creating the PR

/home/jenkins-build/build/workspace/ceph-pull-requests/src/librbd/api/Mirror.cc:85:44: error: ‘PROMOTION_STATE_PRIMARY’ was not declared in this scope
   mirror::PromotionState promotion_state = PROMOTION_STATE_PRIMARY;
@dillaman

This comment has been minimized.

Copy link
Contributor

commented Sep 13, 2017

@amitkumar50 this doesn't build

@amitkumar50 amitkumar50 force-pushed the amitkumar50:cov-librbd-3 branch from 52f1bca to 2ae36e5 Sep 14, 2017

@amitkumar50

This comment has been minimized.

Copy link
Contributor Author

commented Sep 14, 2017

@dillaman Done changes. Thanks. Kindly test now.

@joscollin

This comment has been minimized.

Copy link
Member

commented Sep 14, 2017

Jenkins retest this please

librbd: Initialization of class member variables
Fixes the coverity issues:

** 1402627 Uninitialized scalar field
CID 1402627 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member promotion_state is not
initialized in this constructor nor in any functions that it calls.

** 1402630 Uninitialized scalar field
CID 1402630 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_promotion_state is not
initialized in this constructor nor in any functions that it calls.

** 1402631 Uninitialized scalar field
CID 1402631 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_promotion_state is not
initialized in this constructor nor in any functions that it calls.

** 1402632 Uninitialized scalar field
CID 1402632 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member tag_tid is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>

no compile errors now

@dillaman dillaman added the needs-qa label Sep 14, 2017

@dillaman dillaman changed the title librbd: Initialization of class member variables librbd: address coverity false positives Sep 26, 2017

@dillaman dillaman merged commit 3b01427 into ceph:master Oct 3, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.