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

Andrew Price andyp at fedoraproject.org
Mon Sep 8 17:34:51 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=a5eb2a5a1c447a44d993d63f5fe444dc0a9631d4
Commit:        a5eb2a5a1c447a44d993d63f5fe444dc0a9631d4
Parent:        d49a391965d479c226dfc01efad09e2d96928b92
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 14:57:46 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