* [PATCH] nfs4_getfacl: Initialize acl pointer to NULL
@ 2022-11-21 19:14 Steve Dickson
2022-11-22 13:11 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2022-11-21 19:14 UTC (permalink / raw)
To: Linux NFS Mailing list
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfs4_getfacl: Initialize acl pointer to NULL
2022-11-21 19:14 [PATCH] nfs4_getfacl: Initialize acl pointer to NULL Steve Dickson
@ 2022-11-22 13:11 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2022-11-22 13:11 UTC (permalink / raw)
To: Linux NFS Mailing list
On 11/21/22 2:14 PM, Steve Dickson wrote:
> 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>
Committed... (tag: nfs4-acl-tools-0.4.3-rc1)
steved.
> ---
> 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:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-22 13:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 19:14 [PATCH] nfs4_getfacl: Initialize acl pointer to NULL Steve Dickson
2022-11-22 13:11 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox