Skip to content

Commit

Permalink
rgw: Initialize pointer field in RGWLC
Browse files Browse the repository at this point in the history
Fixes the Coverity Scan Report:
CID 1396146 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member max_objs is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member obj_names is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
  • Loading branch information
joscollin committed Jul 12, 2017
1 parent f3d5e33 commit f1580a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rgw/rgw_lc.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ WRITE_CLASS_ENCODER(RGWLifecycleConfiguration)
class RGWLC {
CephContext *cct;
RGWRados *store;
int max_objs;
string *obj_names;
int max_objs{0};
string *obj_names{nullptr};
std::atomic<bool> down_flag = { false };
string cookie;

Expand Down

0 comments on commit f1580a7

Please sign in to comment.