gfs2-utils: master - gfs2l: Fix uninitialised string warning

Andrew Price andyp at fedoraproject.org
Fri Sep 5 13:39:57 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=b73b07cbfcbca079be0e4685498d107d185a8e19
Commit:        b73b07cbfcbca079be0e4685498d107d185a8e19
Parent:        40685d9e56576dca818835c1fe5194c4caa6d804
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Fri Sep 5 10:26:37 2014 +0100
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Fri Sep 5 10:26:37 2014 +0100

gfs2l: Fix uninitialised string warning

Initialise c to NULL to fix:

  lang.c:142:34: warning: 'c' may be used uninitialized in this function

Signed-off-by: Andrew Price <anprice at redhat.com>
---
 gfs2/libgfs2/lang.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gfs2/libgfs2/lang.c b/gfs2/libgfs2/lang.c
index a9197cb..b4a743f 100644
--- a/gfs2/libgfs2/lang.c
+++ b/gfs2/libgfs2/lang.c
@@ -150,7 +150,7 @@ static void ast_string_unescape(char *str)
 static uint64_t ast_lookup_path(char *path, struct gfs2_sbd *sbd)
 {
 	int err = 0;
-	char *c;
+	char *c = NULL;
 	struct gfs2_inode *ip, *iptmp;
 	char *segment;
 	uint64_t bn = 0;


More information about the cluster-commits mailing list