Skip to content

Commit 239d229

Browse files
committed
rados/rados.cc: init non-static members in default ctor
Fix for: CID 717354 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member id is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member type is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member off is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member len is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member lg is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member completion is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
1 parent 4c99000 commit 239d229

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tools/rados/rados.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ class LoadGen {
527527
LoadGen *lg;
528528
librados::AioCompletion *completion;
529529

530-
LoadGenOp() {}
530+
LoadGenOp() : id(0), type(0), off(0), len(0), lg(NULL), completion(NULL) {}
531531
LoadGenOp(LoadGen *_lg) : id(0), type(0), off(0), len(0), lg(_lg), completion(NULL) {}
532532
};
533533

0 commit comments

Comments
 (0)