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

common: initialize _hash in LogEntryKey() #15615

Merged
merged 1 commit into from Jun 12, 2017

Conversation

Projects
None yet
3 participants
@joscollin
Member

joscollin commented Jun 12, 2017

Fixed:

** CID 717210:  Uninitialized members  (UNINIT_CTOR)
ceph/src/common/LogEntry.h: 70 in LogEntryKey::LogEntryKey()()
Non-static class member "_hash" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin jcollin@redhat.com

@xiexingguo

This comment has been minimized.

Member

xiexingguo commented Jun 12, 2017

rebase?

@joscollin

This comment has been minimized.

Member

joscollin commented Jun 12, 2017

@xiexingguo That was so quick. Rebase Done. Thanks.

@xiexingguo

looks good.

BTW, you can just initialize it in a c++ 11 way:

uint64_t _hash = 0;

common: initialize _hash in LogEntryKey()
Fixed:

** CID 717210:  Uninitialized members  (UNINIT_CTOR)
ceph/src/common/LogEntry.h: 70 in LogEntryKey::LogEntryKey()()
Non-static class member "_hash" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
@joscollin

This comment has been minimized.

Member

joscollin commented Jun 12, 2017

@xiexingguo Yes that is better here, as _hash is omitted in the member initializer list of both constructors. Good Catch, Thanks.

@liewegas liewegas merged commit c7f7500 into ceph:master Jun 12, 2017

2 of 3 checks passed

make check make check failed
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
@joscollin

This comment has been minimized.

Member

joscollin commented Jun 13, 2017

Jenkins Retest this please

@joscollin joscollin deleted the joscollin:wip-CID717210-Uninitialized-members branch Jun 13, 2017

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