Skip to content

Commit

Permalink
afs: Remove set but not used variable 'ret'
Browse files Browse the repository at this point in the history
Fixes gcc '-Wunused-but-set-variable' warning:

fs/afs/server.c: In function afs_install_server:
fs/afs/server.c:157:6: warning: variable ret set but not used [-Wunused-but-set-variable]

It is not used since commit d2ddc77 ("afs:
Overhaul volume and server record caching and fileserver rotation")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
zhengbin authored and David Howells committed Nov 21, 2019
1 parent 51590df commit 4fe171b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/afs/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static struct afs_server *afs_install_server(struct afs_net *net,
const struct afs_addr_list *alist;
struct afs_server *server;
struct rb_node **pp, *p;
int ret = -EEXIST, diff;
int diff;

_enter("%p", candidate);

Expand Down Expand Up @@ -196,7 +196,6 @@ static struct afs_server *afs_install_server(struct afs_net *net,
hlist_add_head_rcu(&server->addr6_link, &net->fs_addresses6);

write_sequnlock(&net->fs_addr_lock);
ret = 0;

exists:
afs_get_server(server, afs_server_trace_get_install);
Expand Down

0 comments on commit 4fe171b

Please sign in to comment.