lkml.org 
[lkml]   [2023]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] smb: client: remove unused variable 'server'
Date
gcc with W=1 reports
fs/smb/client/dfs.c: In function ‘__dfs_mount_share’:
fs/smb/client/dfs.c:146:33: error: variable ‘server
set but not used [-Werror=unused-but-set-variable]
146 | struct TCP_Server_Info *server;
| ^~~~~~

This variable is not used, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
fs/smb/client/dfs.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/fs/smb/client/dfs.c b/fs/smb/client/dfs.c
index 26d14dd0482e..1403a2d1ab17 100644
--- a/fs/smb/client/dfs.c
+++ b/fs/smb/client/dfs.c
@@ -143,7 +143,6 @@ static int __dfs_mount_share(struct cifs_mount_ctx *mnt_ctx)
struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
char *ref_path = NULL, *full_path = NULL;
struct dfs_cache_tgt_iterator *tit;
- struct TCP_Server_Info *server;
struct cifs_tcon *tcon;
char *origin_fullpath = NULL;
char sep = CIFS_DIR_SEP(cifs_sb);
@@ -214,7 +213,6 @@ static int __dfs_mount_share(struct cifs_mount_ctx *mnt_ctx)
} while (rc == -EREMOTE);

if (!rc) {
- server = mnt_ctx->server;
tcon = mnt_ctx->tcon;

spin_lock(&tcon->tc_lock);
--
2.27.0
\
 
 \ /
  Last update: 2023-07-02 15:05    [W:0.025 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site