]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fuse_ll: fix compile error when libfuse version is larger than 3.0 46948/head
authorXiubo Li <xiubli@redhat.com>
Sat, 9 Jul 2022 00:48:40 +0000 (08:48 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 23 Aug 2022 05:42:34 +0000 (13:42 +0800)
Fixes: https://tracker.ceph.com/issues/56517
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 2f3f9d36afc891d55b1e4f13ca212c5aa040ee31)

src/client/fuse_ll.cc

index b725a20e1af7ff01012715d428148cc80b2f6323..2f4cd28b340791c0e0715680139b8fba2b799a1a 100644 (file)
@@ -170,13 +170,13 @@ public:
   int fd_on_success;
   Client *client;
 
-  struct fuse_session *se;
+  struct fuse_session *se = nullptr;
 #if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)
   struct fuse_cmdline_opts opts;
   struct fuse_conn_info_opts *conn_opts;
 #else
-  struct fuse_chan *ch;
-  char *mountpoint;
+  struct fuse_chan *ch = nullptr;
+  char *mountpoint = nullptr;
 #endif
 
   ceph::mutex stag_lock = ceph::make_mutex("fuse_ll.cc stag_lock");
@@ -1370,12 +1370,7 @@ const static struct fuse_lowlevel_ops fuse_ll_oper = {
 
 CephFuse::Handle::Handle(Client *c, int fd) :
   fd_on_success(fd),
-  client(c),
-  se(NULL),
-#if FUSE_VERSION < FUSE_MAKE_VERSION(3, 0)
-  ch(NULL),
-  mountpoint(NULL)
-#endif
+  client(c)
 {
   memset(&args, 0, sizeof(args));
 #if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)