]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:netapi: Remove unused variables
authorAndreas Schneider <asn@samba.org>
Fri, 3 Feb 2023 19:32:54 +0000 (20:32 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 6 Feb 2023 22:51:32 +0000 (22:51 +0000)
source3/lib/netapi/tests/netfile.c:40:22: error: variable 'i2' set but not used
[-Werror,-Wunused-but-set-variable]
  struct FILE_INFO_2 *i2 = NULL;
                      ^
source3/lib/netapi/tests/netfile.c:41:22: error: variable 'i3' set but not used
[-Werror,-Wunused-but-set-variable]
  struct FILE_INFO_3 *i3 = NULL;
                      ^

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/netapi/tests/netfile.c

index bee3c2ed5eb26a5f9031ef70143368cb5f877942..87aff029320d9277a1ea1d93141f0b35b2b89ce4 100644 (file)
@@ -37,9 +37,6 @@ static NET_API_STATUS test_netfileenum(const char *hostname,
        uint8_t *buffer = NULL;
        int i;
 
-       struct FILE_INFO_2 *i2 = NULL;
-       struct FILE_INFO_3 *i3 = NULL;
-
        printf("testing NetFileEnum level %d\n", level);
 
        do {
@@ -55,10 +52,8 @@ static NET_API_STATUS test_netfileenum(const char *hostname,
                if (status == 0 || status == ERROR_MORE_DATA) {
                        switch (level) {
                                case 2:
-                                       i2 = (struct FILE_INFO_2 *)buffer;
                                        break;
                                case 3:
-                                       i3 = (struct FILE_INFO_3 *)buffer;
                                        break;
                                default:
                                        return -1;
@@ -76,10 +71,8 @@ static NET_API_STATUS test_netfileenum(const char *hostname,
 
                                switch (level) {
                                        case 2:
-                                               i2++;
                                                break;
                                        case 3:
-                                               i3++;
                                                break;
                                }
                        }