[PATCH] nfs4_getfacl: Initialize acl pointer to NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



nfs4_getfacl.c: scope_hint: In function 'print_acl_from_path'
nfs4_getfacl.c:168:17: warning[-Wmaybe-uninitialized]:
    'acl' may be used uninitialized in this function

Signed-off-by: Steve Dickson <steved@xxxxxxxxxx>
---
 nfs4_getfacl/nfs4_getfacl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nfs4_getfacl/nfs4_getfacl.c b/nfs4_getfacl/nfs4_getfacl.c
index 954cf7e..ddb3005 100644
--- a/nfs4_getfacl/nfs4_getfacl.c
+++ b/nfs4_getfacl/nfs4_getfacl.c
@@ -148,7 +148,7 @@ out:
 
 static void print_acl_from_path(const char *fpath, enum acl_type type)
 {
-	struct nfs4_acl *acl;
+	struct nfs4_acl *acl = NULL;
 
 	switch (type) {
 	case ACL_TYPE_ACL:
-- 
2.38.1




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux