summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-04-29 14:07:46 -0700
committerBrian Behlendorf <[email protected]>2013-05-01 17:05:58 -0700
commita4914d38a794915c774670307d6f61480eba2046 (patch)
tree80918668d511a8740d0ec20101a7944c2f26cd68
parent937210a54b9c2d3dddc7221e31d5695e9720a055 (diff)
Silence 'old_umask' uninit variable warning
Recent changes have caused older versions of gcc to mistakenly flag 'old_umask' in vn_open() as an unitialized variable. To silence the warning initialize it. kernel.c: In function 'vn_open': kernel.c:525:6: error: 'old_umask' may be used uninitialized in this function Signed-off-by: Brian Behlendorf <[email protected]>
-rw-r--r--lib/libzpool/kernel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c
index c1ce82d1b..f7aeeb440 100644
--- a/lib/libzpool/kernel.c
+++ b/lib/libzpool/kernel.c
@@ -522,7 +522,7 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
{
int fd;
vnode_t *vp;
- int old_umask;
+ int old_umask = 0;
char *realpath;
struct stat64 st;
int err;