]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/lib/netapi: clang: Fix 'Value stored during initialization is never read'
authorNoel Power <noel.power@suse.com>
Mon, 16 Sep 2019 10:35:49 +0000 (10:35 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 26 Sep 2019 18:41:27 +0000 (18:41 +0000)
Fixes:

source3/lib/netapi/group.c:1383:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
samba/source3/lib/netapi/group.c:1521:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
samba/source3/lib/netapi/group.c:1718:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
3 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/netapi/group.c

index f4f2dc26b6afed5555734b918ecafc225cf57b18..e0b7458e58cfaf25d000ea098ac163777d19fdb7 100644 (file)
@@ -1380,7 +1380,7 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
        uint32_t returned_size = 0;
 
        NTSTATUS result = NT_STATUS_OK;
-       NTSTATUS status = NT_STATUS_OK;
+       NTSTATUS status;
        WERROR werr, tmp_werr;
 
        ZERO_STRUCT(connect_handle);
@@ -1518,7 +1518,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
        int i;
        uint32_t entries_read = 0;
 
-       NTSTATUS status = NT_STATUS_OK;
+       NTSTATUS status;
        NTSTATUS result = NT_STATUS_OK;
        WERROR werr;
 
@@ -1715,7 +1715,7 @@ WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
 
        int i, k;
 
-       NTSTATUS status = NT_STATUS_OK;
+       NTSTATUS status;
        NTSTATUS result = NT_STATUS_OK;
        WERROR werr;