From: Brian Behlendorf Date: Mon, 29 Apr 2013 21:07:46 +0000 (-0700) Subject: Silence 'old_umask' uninit variable warning X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=zfs.git;a=commitdiff_plain;h=a4914d38a794915c774670307d6f61480eba2046 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 --- diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index c1ce82d..f7aeeb4 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;