Skip to content

Commit 2c3dd4f

Browse files
author
Alex Elder
committed
ceph: eliminate sparse warnings in fs code
Fix the causes for sparse warnings reported in the ceph file system code. Here there are only two (and they're sort of silly but they're easy to fix). This partially resolves: http://tracker.ceph.com/issues/4184 Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
1 parent cc344fa commit 2c3dd4f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/ceph/xattr.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static struct ceph_vxattr ceph_dir_vxattrs[] = {
213213
XATTR_NAME_CEPH(dir, rsubdirs),
214214
XATTR_NAME_CEPH(dir, rbytes),
215215
XATTR_NAME_CEPH(dir, rctime),
216-
{ 0 } /* Required table terminator */
216+
{ .name = NULL, 0 } /* Required table terminator */
217217
};
218218
static size_t ceph_dir_vxattrs_name_size; /* total size of all names */
219219

@@ -232,7 +232,7 @@ static struct ceph_vxattr ceph_file_vxattrs[] = {
232232
XATTR_LAYOUT_FIELD(file, layout, stripe_count),
233233
XATTR_LAYOUT_FIELD(file, layout, object_size),
234234
XATTR_LAYOUT_FIELD(file, layout, pool),
235-
{ 0 } /* Required table terminator */
235+
{ .name = NULL, 0 } /* Required table terminator */
236236
};
237237
static size_t ceph_file_vxattrs_name_size; /* total size of all names */
238238

0 commit comments

Comments
 (0)