]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Initialize pointer field in RGWLibFS
authorJos Collin <jcollin@redhat.com>
Thu, 29 Jun 2017 14:41:29 +0000 (20:11 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 12 Jul 2017 16:03:04 +0000 (21:33 +0530)
Fixes the Coverity Scan Report:
CID 1352180 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member field fs.rgw is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/rgw/rgw_file.h

index 852e7c3801e0e165355081c1fa595f60022ed173..495af90e2fe2d24569cabe2aed971eff3dc17f06 100644 (file)
@@ -741,7 +741,7 @@ namespace rgw {
   class RGWLibFS
   {
     CephContext* cct;
-    struct rgw_fs fs;
+    struct rgw_fs fs{};
     RGWFileHandle root_fh;
     rgw_fh_callback_t invalidate_cb;
     void *invalidate_arg;