]> 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>
Tue, 17 Sep 2019 14:43:20 +0000 (14:43 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 26 Sep 2019 18:41:28 +0000 (18:41 +0000)
Fixes:

source3/lib/netapi/user.c:1290:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:1610:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~

source3/lib/netapi/user.c:2990:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:3184:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:3522:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~

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

index fc236e55d1f0bb48aef96eba9596b2936df9a65a..fb38b233b86e0fc96cd2761a542e7b716b9738de 100644 (file)
@@ -1293,7 +1293,7 @@ WERROR NetUserEnum_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;
        struct dcerpc_binding_handle *b = NULL;
@@ -1613,7 +1613,7 @@ WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx *ctx,
        uint32_t total_size = 0;
        uint32_t returned_size = 0;
 
-       NTSTATUS status = NT_STATUS_OK;
+       NTSTATUS status;
        NTSTATUS result = NT_STATUS_OK;
        WERROR werr;
        WERROR werr_tmp;
@@ -2993,7 +2993,7 @@ WERROR NetUserGetGroups_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;
        struct dcerpc_binding_handle *b = NULL;
@@ -3187,7 +3187,7 @@ WERROR NetUserSetGroups_r(struct libnetapi_ctx *ctx,
 
        int i, k;
 
-       NTSTATUS status = NT_STATUS_OK;
+       NTSTATUS status;
        NTSTATUS result = NT_STATUS_OK;
        WERROR werr;
        struct dcerpc_binding_handle *b = NULL;
@@ -3525,7 +3525,7 @@ WERROR NetUserGetLocalGroups_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;
        struct dcerpc_binding_handle *b = NULL;