Skip to contentSkip to conversation

cifs: Remove useless variable

PATCH Applied Jiapeng Chong 2 participants 2 messages Apr 8, 2021 – Apr 9, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: Remove useless variable

Fix the following gcc warning:

fs/cifs/cifsacl.c:1097:8: warning: variable ‘nmode’ set but not used [-Wunused-but-set-variable].

---
 fs/cifs/cifsacl.c | 2 --
 1 file changed, 2 deletions(-)
fs/cifs/cifsacl.c +0 -2
index d178cf8..fdb258a 100644
@@ -1094,11 +1094,9 @@ static int set_chmod_dacl(struct cifs_acl *pdacl, struct cifs_acl *pndacl,
 	struct cifs_ace *pnntace = NULL;
 	char *nacl_base = NULL;
 	u32 num_aces = 0;
-	__u64 nmode;
 	bool new_aces_set = false;
 
 	/* Assuming that pndacl and pnmode are never NULL */
-	nmode = *pnmode;
 	nacl_base = (char *)pndacl;
 	nsize = sizeof(struct cifs_acl);
 
Signature · 1 line
1.8.3.1
Applied
#1 lore raw

merged into cifs-2.6.git for-next

Quoted 31 lines · Jiapeng Chong

Fix the following gcc warning:

fs/cifs/cifsacl.c:1097:8: warning: variable ‘nmode’ set but not used [-Wunused-but-set-variable].

---
 fs/cifs/cifsacl.c | 2 --
 1 file changed, 2 deletions(-)
fs/cifs/cifsacl.c +0 -3
index d178cf8..fdb258a 100644
@@ -1094,11 +1094,9 @@ static int set_chmod_dacl(struct cifs_acl *pdacl, struct cifs_acl *pndacl,
        struct cifs_ace *pnntace = NULL;
        char *nacl_base = NULL;
        u32 num_aces = 0;
-       __u64 nmode;
        bool new_aces_set = false;
 
        /* Assuming that pndacl and pnmode are never NULL */
-       nmode = *pnmode;
        nacl_base = (char *)pndacl;
        nsize = sizeof(struct cifs_acl);
 
--

1.8.3.1

Signature · 3 lines
Thanks,

Steve