[syslinux:master] core/xfs: Silence compiler warning

syslinux-bot for Gene Cumm gene.cumm at gmail.com
Tue Jan 19 03:57:06 PST 2016


Commit-ID:  496bb8c2a19ccf9e8c6c67b925c492c924c9378a
Gitweb:     http://www.syslinux.org/commit/496bb8c2a19ccf9e8c6c67b925c492c924c9378a
Author:     Gene Cumm <gene.cumm at gmail.com>
AuthorDate: Mon, 18 Jan 2016 19:27:18 -0500
Committer:  Gene Cumm <gene.cumm at gmail.com>
CommitDate: Tue, 19 Jan 2016 06:33:14 -0500

core/xfs: Silence compiler warning

"may be used uninitialized in this function [-Wuninitialized]" even though logic dictates
it must be OK.

Signed-off-by: Gene Cumm <gene.cumm at gmail.com>

---
 core/fs/xfs/xfs_dir2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/fs/xfs/xfs_dir2.c b/core/fs/xfs/xfs_dir2.c
index f738a58..2f5928a 100644
--- a/core/fs/xfs/xfs_dir2.c
+++ b/core/fs/xfs/xfs_dir2.c
@@ -630,7 +630,7 @@ struct inode *xfs_dir2_node_find_entry(const char *dname, struct inode *parent,
     block_t fsblkno;
     xfs_da_node_hdr_t *nhdr;
     uint32_t hashwant;
-    uint32_t hash;
+    uint32_t hash = 0;
     uint16_t i;
     uint16_t count;
     xfs_da_node_entry_t *btree;
@@ -645,7 +645,7 @@ struct inode *xfs_dir2_node_find_entry(const char *dname, struct inode *parent,
     uint8_t *end_name;
     int low;
     int high;
-    int mid;
+    int mid = 0;
     uint32_t newdb;
     uint32_t curdb;
     xfs_intino_t ino;


More information about the Syslinux-commits mailing list