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
osd: Initialization of data members #17691
Conversation
src/osd/PrimaryLogPG.cc
Outdated
@@ -4404,7 +4404,7 @@ struct C_ChecksumRead : public Context { | |||
OSDOp &osd_op; | |||
Checksummer::CSumType csum_type; | |||
bufferlist init_value_bl; | |||
ceph_le64 read_length; | |||
ceph_le64 read_length {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Avoid unwanted space before {
198a866
to
4420cee
Compare
Done Thanks @joscollin |
src/osd/PrimaryLogPG.cc
Outdated
@@ -4404,7 +4404,7 @@ struct C_ChecksumRead : public Context { | |||
OSDOp &osd_op; | |||
Checksummer::CSumType csum_type; | |||
bufferlist init_value_bl; | |||
ceph_le64 read_length; | |||
ceph_le64 read_length{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ceph_le64
seems to be an unsigned integer. So better initialize with 0
to be specific.
Done Thanks @joscollin |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not compile
c0ab7e9
to
de90bd6
Compare
@tchaikov Done Changes. Thanks |
Fixes the coverity issues: ** 717336 Uninitialized scalar field CID 717336 (ceph#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member whitelisted is not initialized in this constructor nor in any functions that it calls. ** 728001 Uninitialized scalar field CID 728001 (ceph#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member priority is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Amit Kumar <amitkuma@redhat.com>
@tchaikov can you plz review |
Fixes the coverity issues:
** 717336 Uninitialized scalar field
** 728001 Uninitialized scalar field
** 1405358 Uninitialized scalar field
Signed-off-by: Amit Kumar amitkuma@redhat.com