From: Xiubo Li Date: Sat, 9 Jul 2022 00:48:40 +0000 (+0800) Subject: fuse_ll: fix compile error when libfuse version is larger than 3.0 X-Git-Tag: v16.2.11~353^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=555267c3943775d3b13cf0204c218c61741deb39;p=ceph.git fuse_ll: fix compile error when libfuse version is larger than 3.0 Fixes: https://tracker.ceph.com/issues/56517 Signed-off-by: Xiubo Li (cherry picked from commit 2f3f9d36afc891d55b1e4f13ca212c5aa040ee31) --- diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index e1afe2c16348..fd9d1f55bf82 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -153,13 +153,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"); @@ -1269,12 +1269,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)