From: Noel Power Date: Tue, 17 Sep 2019 14:43:20 +0000 (+0000) Subject: s3/lib/netapi: clang: Fix 'Value stored during initialization is never read' X-Git-Tag: talloc-2.3.1~545 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ae0fd5a348224b2a7942c81c4ef21bf11205d62;p=thirdparty%2Fsamba.git s3/lib/netapi: clang: Fix 'Value stored during initialization is never read' 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index fc236e55d1f..fb38b233b86 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -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;