public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] nfs4_getfacl: Initialize acl pointer to NULL
Date: Mon, 21 Nov 2022 14:14:27 -0500	[thread overview]
Message-ID: <20221121191427.132409-1-steved@redhat.com> (raw)

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@redhat.com>
---
 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


             reply	other threads:[~2022-11-21 19:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 19:14 Steve Dickson [this message]
2022-11-22 13:11 ` [PATCH] nfs4_getfacl: Initialize acl pointer to NULL Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221121191427.132409-1-steved@redhat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox