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
msg, messages: coverity fixes #13473
Conversation
addresses CID 1400661: Uninitialized variables (UNINIT) Signed-off-by: Kefu Chai <kchai@redhat.com>
addresses CID 1400658: Incorrect expression (NO_EFFECT) Signed-off-by: Kefu Chai <kchai@redhat.com>
addresses CID 1400656: Incorrect expression (NO_EFFECT) Signed-off-by: Kefu Chai <kchai@redhat.com>
@@ -427,9 +427,6 @@ int Pipe::accept() | |||
goto fail_unlocked; | |||
} | |||
|
|||
// sanitize features | |||
connect.features = connect.features; | |||
|
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.
Did you check the history on these? I don't recognize them but the warning made me concerned they are meant to do something (say, sanitize the feature list into something we understand?) via C++ magic that has failed.
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.
@gregsfortytwo i did check the history as this statement is quite weird from the first glance. they were meant to do something. the commit Sage changed to this is ff19592. and ceph_sanitize_features()
has gone. i see no reason to keep the foo = foo
around anymore.
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.
Yep, I was just sloppy removing the sanitize call!
src/common/perf_histogram.h
Outdated
int64_t m_quant_size; | ||
int32_t m_buckets; | ||
const char *m_name = nullptr; | ||
scale_type_d m_scale_type = 0; |
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.
This does not compile. Please initialize with SCALE_LINEAR
.
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.
fixed and repushed.
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.
@tchaikov huh, the fix won't be that easy, adding default values removed default constructors.
Not that pretty but works:
struct axis_config_d {
explicit axis_config_d(const char *name = nullptr,
scale_type_d scale_type = SCALE_LINEAR,
int64_t min = 0, int64_t quant_size = 0,
int32_t buckets = 0)
: m_name(name),
m_scale_type(scale_type),
m_min(min),
m_quant_size(quant_size),
m_buckets(buckets) {}
const char *m_name;
scale_type_d m_scale_type;
int64_t m_min;
int64_t m_quant_size;
int32_t m_buckets;
};
68df34f
to
e3c2f37
Compare
e3c2f37
to
28957e0
Compare
addresses CID 1400670: (UNINIT_CTOR) Signed-off-by: Kefu Chai <kchai@redhat.com>
28957e0
to
6e28549
Compare
@dillaman i dropped the rbd-nbd changes from this PR, we can come back later with better idea later. |
No description provided.