]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
include/ceph_fs: do not use anonymous aggregate with member having ctor
authorKefu Chai <kchai@redhat.com>
Fri, 22 May 2020 09:53:33 +0000 (17:53 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 22 May 2020 13:19:36 +0000 (21:19 +0800)
commitd822ffe1fa3e45716bedd3153b9d89b75409df45
treeba625d2ee0ed757c8cbdc77ed664c7b027e9c733
parent617298c201f8bbb9c16ff0a43c13d6dd93f90f82
include/ceph_fs: do not use anonymous aggregate with member having ctor

GCC-10 fails to compile ceph_fs.h, with following error:

In file included from ../src/include/types.h:27,
                 from ../src/msg/msg_types.h:23,
                 from ../src/common/ipaddr.cc:16:
../src/include/ceph_fs.h:891:11: error: member ‘ceph_le32 ceph_mds_caps_body_legacy::<unnamed union>::<unnamed struct>::truncate_seq’ with constructor not allowed in anonymous aggregate
  891 |    __le32 truncate_seq;
      |           ^~~~~~~~~~~~
../src/include/ceph_fs.h:892:25: error: member ‘ceph_timespec ceph_mds_caps_body_legacy::<unnamed union>::<unnamed struct>::mtime’ with constructor not allowed in anonymous aggregate
  892 |    struct ceph_timespec mtime, atime, ctime;
      |                         ^~~~~
../src/include/ceph_fs.h:892:32: error: member ‘ceph_timespec ceph_mds_caps_body_legacy::<unnamed union>::<unnamed struct>::atime’ with constructor not allowed in anonymous aggregate
  892 |    struct ceph_timespec mtime, atime, ctime;
      |                                ^~~~~
../src/include/ceph_fs.h:892:39: error: member ‘ceph_timespec ceph_mds_caps_body_legacy::<unnamed union>::<unnamed struct>::ctime’ with constructor not allowed in anonymous aggregate
  892 |    struct ceph_timespec mtime, atime, ctime;
      |                                       ^~~~~

because, for instance, `ceph_timespec` has compiler generated
constructor, and it's not allowed by C++17 standard.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/ceph_fs.h
src/include/types.h
src/messages/MClientCaps.h