From 32d2584c23839efc9451a3563e891170dfc59027 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 15 Feb 2022 19:37:17 +1100 Subject: [PATCH] util: Drop unused variable num_received clang complains: ../../source4/libcli/clilist.c:111:6: error: variable 'num_received' set but not used [-Werror,-Wunused-but-set-variable] int num_received = 0; ^ ../../source4/libcli/clilist.c:268:6: error: variable 'num_received' set but not used [-Werror,-Wunused-but-set-variable] int num_received = 0; ^ That is, the variable is initialised and updated but the value is never used. Signed-off-by: Martin Schwenke Reviewed-by: Volker Lendecke --- source4/libcli/clilist.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source4/libcli/clilist.c b/source4/libcli/clilist.c index 2fa4112200e..eb9199dc749 100644 --- a/source4/libcli/clilist.c +++ b/source4/libcli/clilist.c @@ -108,7 +108,6 @@ int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribu struct search_private state; /* for callbacks */ int received = 0; bool first = true; - int num_received = 0; int max_matches = 512; char *mask; int ff_eos = 0, i; @@ -185,8 +184,6 @@ int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribu if (received <= 0) break; if (ff_eos) break; } - - num_received += received; } for (i=0;i