svn commit: r240934 - projects/mtree/contrib/mtree

Brooks Davis brooks at FreeBSD.org
Tue Sep 25 21:26:45 UTC 2012


Author: brooks
Date: Tue Sep 25 21:26:44 2012
New Revision: 240934
URL: http://svn.freebsd.org/changeset/base/240934

Log:
  Initialize the name variable to work around older gcc's weak uninitialized
  variable checking.

Modified:
  projects/mtree/contrib/mtree/create.c

Modified: projects/mtree/contrib/mtree/create.c
==============================================================================
--- projects/mtree/contrib/mtree/create.c	Tue Sep 25 21:25:47 2012	(r240933)
+++ projects/mtree/contrib/mtree/create.c	Tue Sep 25 21:26:44 2012	(r240934)
@@ -167,7 +167,7 @@ statf(int indent, FTSENT *p)
 {
 	u_int32_t len, val;
 	int fd, offset;
-	const char *name;
+	const char *name = NULL;
 #if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1) || !defined(NO_SHA2)
 	char *digestbuf;
 #endif
@@ -314,7 +314,7 @@ statd(FTS *t, FTSENT *parent, uid_t *pui
 	uid_t suid;
 	mode_t smode;
 	u_long sflags = 0;
-	const char *name;
+	const char *name = NULL;
 	gid_t savegid;
 	uid_t saveuid;
 	mode_t savemode;


More information about the svn-src-projects mailing list