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

amitkumar50
Copy link

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

Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

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

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
Copy link

@amitkumar50 this doesn't build

@amitkumar50
Copy link
Author

@dillaman Done changes. Thanks. Kindly test now.

@joscollin
Copy link
Member

Jenkins retest this please

Fixes the coverity issues:

** 1402627 Uninitialized scalar field
CID 1402627 (ceph#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 (ceph#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 (ceph#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 (ceph#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>
@dillaman dillaman dismissed joscollin’s stale review September 14, 2017 14:02

no compile errors now

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants