From 41e052dc200ac0fd06785f006a24435101465852 Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Mon, 4 Nov 2013 06:18:45 -0800 Subject: [PATCH] Revert "fix -Wgnu-designator warnings" Struct initialization using dot notation as in C99, but that happens to not be valid C++, although apparently in C++11 it is valid. We'll need a way to keep clang from throwing warnings at this initialization style, either using some macros to detect the comiler environment, or perhaps moving struct initialization to a C file rather than C++. This reverts commit 6efc2b54d5ce85fcb4b66237b051bcbb5072e6a3. Signed-off-by: Noah Watkins --- src/client/fuse_ll.cc | 84 +++++++++++++++++++++---------------------- src/common/config.cc | 14 ++++---- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 60cdf5a1915..88f727e454e 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -595,53 +595,53 @@ static void do_init(void *data, fuse_conn_info *bar) } const static struct fuse_lowlevel_ops fuse_ll_oper = { - .init = do_init, - .destroy = 0, - .lookup = fuse_ll_lookup, - .forget = fuse_ll_forget, - .getattr = fuse_ll_getattr, - .setattr = fuse_ll_setattr, - .readlink = fuse_ll_readlink, - .mknod = fuse_ll_mknod, - .mkdir = fuse_ll_mkdir, - .unlink = fuse_ll_unlink, - .rmdir = fuse_ll_rmdir, - .symlink = fuse_ll_symlink, - .rename = fuse_ll_rename, - .link = fuse_ll_link, - .open = fuse_ll_open, - .read = fuse_ll_read, - .write = fuse_ll_write, - .flush = fuse_ll_flush, - .release = fuse_ll_release, - .fsync = fuse_ll_fsync, - .opendir = fuse_ll_opendir, - .readdir = fuse_ll_readdir, - .releasedir = fuse_ll_releasedir, - .fsyncdir = 0, - .statfs = fuse_ll_statfs, - .setxattr = fuse_ll_setxattr, - .getxattr = fuse_ll_getxattr, - .listxattr = fuse_ll_listxattr, - .removexattr = fuse_ll_removexattr, - .access = 0, - .create = fuse_ll_create, - .getlk = 0, - .setlk = 0, - .bmap = 0, + init: do_init, + destroy: 0, + lookup: fuse_ll_lookup, + forget: fuse_ll_forget, + getattr: fuse_ll_getattr, + setattr: fuse_ll_setattr, + readlink: fuse_ll_readlink, + mknod: fuse_ll_mknod, + mkdir: fuse_ll_mkdir, + unlink: fuse_ll_unlink, + rmdir: fuse_ll_rmdir, + symlink: fuse_ll_symlink, + rename: fuse_ll_rename, + link: fuse_ll_link, + open: fuse_ll_open, + read: fuse_ll_read, + write: fuse_ll_write, + flush: fuse_ll_flush, + release: fuse_ll_release, + fsync: fuse_ll_fsync, + opendir: fuse_ll_opendir, + readdir: fuse_ll_readdir, + releasedir: fuse_ll_releasedir, + fsyncdir: 0, + statfs: fuse_ll_statfs, + setxattr: fuse_ll_setxattr, + getxattr: fuse_ll_getxattr, + listxattr: fuse_ll_listxattr, + removexattr: fuse_ll_removexattr, + access: 0, + create: fuse_ll_create, + getlk: 0, + setlk: 0, + bmap: 0, #if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8) #ifdef FUSE_IOCTL_COMPAT - .ioctl = fuse_ll_ioctl, + ioctl: fuse_ll_ioctl, #else - .ioctl = 0, + ioctl: 0, #endif - .poll = 0, + poll: 0, #if FUSE_VERSION > FUSE_MAKE_VERSION(2, 9) - .write_buf = 0, - .retrieve_reply = 0, - .forget_multi = 0, - .flock = 0, - .fallocate = fuse_ll_fallocate + write_buf: 0, + retrieve_reply: 0, + forget_multi: 0, + flock: 0, + fallocate: fuse_ll_fallocate #endif #endif }; diff --git a/src/common/config.cc b/src/common/config.cc index ddbb8b3c8c4..5c64f4ec151 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -58,13 +58,13 @@ const char *CEPH_CONF_FILE_DEFAULT = "/etc/ceph/$cluster.conf, ~/.ceph/$cluster. // file layouts struct ceph_file_layout g_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), + 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), }; #define _STR(x) #x -- 2.47.3