From 419d3399dce6a3bfd3ad4b9ce5a61d89a8bdbd8c Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Tue, 15 Apr 2014 16:23:07 +0800 Subject: [PATCH] Initialize 'path' correctly It fixes the warnings src/ntfs-3g.c: In function 'ntfs_fuse_readlink': src/ntfs-3g.c:987:6: warning: 'path' may be used uninitialized in this function [-Wmaybe-uninitialized] src/ntfs-3g.c: In function 'ntfs_fuse_create': src/ntfs-3g.c:1765:6: warning: 'path' may be used uninitialized in this function [-Wmaybe-uninitialized] --- src/ntfs-3g.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index baccbfdc..2d063427 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -896,7 +896,7 @@ exit: static int ntfs_fuse_readlink(const char *org_path, char *buf, size_t buf_size) { - char *path; + char *path = NULL; ntfschar *stream_name; ntfs_inode *ni = NULL; ntfs_attr *na = NULL; @@ -1617,7 +1617,7 @@ static int ntfs_fuse_create(const char *org_path, mode_t typemode, dev_t dev, ntfs_inode *dir_ni = NULL, *ni; char *dir_path; le32 securid; - char *path; + char *path = NULL; gid_t gid; mode_t dsetgid; ntfschar *stream_name;