]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
radosstriper: do not use GCC extension to initialize struct members
authorKefu Chai <kchai@redhat.com>
Tue, 9 May 2017 16:32:11 +0000 (00:32 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 10 May 2017 15:12:30 +0000 (23:12 +0800)
it's obsolete since GCC 2.5 and is not portable. see
https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/libradosstriper/RadosStriperImpl.cc

index ea3be3b145c69da0ca212c6925f8810e382593bf..738b948e80b03663c9fa2dd73a48d244f8cf0244 100644 (file)
 
 /// default object layout
 struct ceph_file_layout default_file_layout = {
- fl_stripe_unit: init_le32(1<<22),
- fl_stripe_count: init_le32(1),
- fl_object_size: init_le32(1<<22),
- fl_cas_hash: init_le32(0),
- fl_object_stripe_unit: init_le32(0),
- fl_unused: init_le32(-1),
- fl_pg_pool : init_le32(-1),
+  init_le32(1<<22),    // fl_stripe_unit
+  init_le32(1),                // fl_stripe_count
+  init_le32(1<<22),    // fl_object_size
+  init_le32(0),                // fl_cas_hash
+  init_le32(0),                // fl_object_stripe_unit
+  init_le32(-1),       // fl_unused
+  init_le32(-1),       // fl_pg_pool
 };