aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_acl.c1
-rw-r--r--fs/xfs/xfs_alloc_btree.c8
-rw-r--r--fs/xfs/xfs_dir2_sf.c6
-rw-r--r--fs/xfs/xfs_dir_leaf.c2
-rw-r--r--fs/xfs/xfs_ialloc_btree.c7
5 files changed, 20 insertions, 4 deletions
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 571bb3205d50..cc9c91b9e771 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -436,6 +436,7 @@ xfs_acl_access(
436 int seen_userobj = 0; 436 int seen_userobj = 0;
437 437
438 matched.ae_tag = 0; /* Invalid type */ 438 matched.ae_tag = 0; /* Invalid type */
439 matched.ae_perm = 0;
439 md >>= 6; /* Normalize the bits for comparison */ 440 md >>= 6; /* Normalize the bits for comparison */
440 441
441 for (i = 0; i < fap->acl_cnt; i++) { 442 for (i = 0; i < fap->acl_cnt; i++) {
diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c
index 1a34b7d99bcd..7ecc8c0611d1 100644
--- a/fs/xfs/xfs_alloc_btree.c
+++ b/fs/xfs/xfs_alloc_btree.c
@@ -614,6 +614,14 @@ xfs_alloc_insrec(
614 xfs_alloc_rec_t *rp; /* pointer to btree records */ 614 xfs_alloc_rec_t *rp; /* pointer to btree records */
615 615
616 ASSERT(INT_GET(recp->ar_blockcount, ARCH_CONVERT) > 0); 616 ASSERT(INT_GET(recp->ar_blockcount, ARCH_CONVERT) > 0);
617
618 /*
619 * GCC doesn't understand the (arguably complex) control flow in
620 * this function and complains about uninitialized structure fields
621 * without this.
622 */
623 memset(&nrec, 0, sizeof(nrec));
624
617 /* 625 /*
618 * If we made it to the root level, allocate a new root block 626 * If we made it to the root level, allocate a new root block
619 * and we're done. 627 * and we're done.
diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c
index 6504afc54a55..ec8e7476c8b7 100644
--- a/fs/xfs/xfs_dir2_sf.c
+++ b/fs/xfs/xfs_dir2_sf.c
@@ -86,7 +86,7 @@ xfs_dir2_block_sfsize(
86 int isdotdot; /* entry is ".." */ 86 int isdotdot; /* entry is ".." */
87 xfs_mount_t *mp; /* mount structure pointer */ 87 xfs_mount_t *mp; /* mount structure pointer */
88 int namelen; /* total name bytes */ 88 int namelen; /* total name bytes */
89 xfs_ino_t parent; /* parent inode number */ 89 xfs_ino_t parent = 0; /* parent inode number */
90 int size=0; /* total computed size */ 90 int size=0; /* total computed size */
91 91
92 mp = dp->i_mount; 92 mp = dp->i_mount;
@@ -277,11 +277,11 @@ xfs_dir2_sf_addname(
277 int incr_isize; /* total change in size */ 277 int incr_isize; /* total change in size */
278 int new_isize; /* di_size after adding name */ 278 int new_isize; /* di_size after adding name */
279 int objchange; /* changing to 8-byte inodes */ 279 int objchange; /* changing to 8-byte inodes */
280 xfs_dir2_data_aoff_t offset; /* offset for new entry */ 280 xfs_dir2_data_aoff_t offset = 0; /* offset for new entry */
281 int old_isize; /* di_size before adding name */ 281 int old_isize; /* di_size before adding name */
282 int pick; /* which algorithm to use */ 282 int pick; /* which algorithm to use */
283 xfs_dir2_sf_t *sfp; /* shortform structure */ 283 xfs_dir2_sf_t *sfp; /* shortform structure */
284 xfs_dir2_sf_entry_t *sfep; /* shortform entry */ 284 xfs_dir2_sf_entry_t *sfep = NULL; /* shortform entry */
285 285
286 xfs_dir2_trace_args("sf_addname", args); 286 xfs_dir2_trace_args("sf_addname", args);
287 ASSERT(xfs_dir2_sf_lookup(args) == ENOENT); 287 ASSERT(xfs_dir2_sf_lookup(args) == ENOENT);
diff --git a/fs/xfs/xfs_dir_leaf.c b/fs/xfs/xfs_dir_leaf.c
index f0c603a78fc1..950df31efc46 100644
--- a/fs/xfs/xfs_dir_leaf.c
+++ b/fs/xfs/xfs_dir_leaf.c
@@ -628,7 +628,7 @@ xfs_dir_leaf_to_shortform(xfs_da_args_t *iargs)
628 xfs_dir_leaf_name_t *namest; 628 xfs_dir_leaf_name_t *namest;
629 xfs_da_args_t args; 629 xfs_da_args_t args;
630 xfs_inode_t *dp; 630 xfs_inode_t *dp;
631 xfs_ino_t parent; 631 xfs_ino_t parent = 0;
632 char *tmpbuffer; 632 char *tmpbuffer;
633 int retval, i; 633 int retval, i;
634 xfs_dabuf_t *bp; 634 xfs_dabuf_t *bp;
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c
index e5c23445d38b..6912143f6ffe 100644
--- a/fs/xfs/xfs_ialloc_btree.c
+++ b/fs/xfs/xfs_ialloc_btree.c
@@ -551,6 +551,13 @@ xfs_inobt_insrec(
551 xfs_inobt_rec_t *rp=NULL; /* pointer to btree records */ 551 xfs_inobt_rec_t *rp=NULL; /* pointer to btree records */
552 552
553 /* 553 /*
554 * GCC doesn't understand the (arguably complex) control flow in
555 * this function and complains about uninitialized structure fields
556 * without this.
557 */
558 memset(&nrec, 0, sizeof(nrec));
559
560 /*
554 * If we made it to the root level, allocate a new root block 561 * If we made it to the root level, allocate a new root block
555 * and we're done. 562 * and we're done.
556 */ 563 */