]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/auth: clang: Fix 'Value stored during its initialization is never read'
authorNoel Power <noel.power@suse.com>
Fri, 13 Sep 2019 13:54:11 +0000 (13:54 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 26 Sep 2019 18:41:27 +0000 (18:41 +0000)
Fixes:

source3/auth/auth_util.c:283:11: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
                 ^~~   ~~~~~~~~~~~~~~~~~~~~~~
source3/auth/auth_util.c:2005:11: warning: Value stored to 'nt_status' during its initialization is never read <--[clang]
        NTSTATUS nt_status = NT_STATUS_OK;
                 ^~~~~~~~~   ~~~~~~~~~~~~
2 warnings generated.

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

index d0be7e6c576ed49937b9a93615bbee4326768fc1..4f9b0a91022498e0c2910c9d3378e781697af4ba 100644 (file)
@@ -280,7 +280,7 @@ bool make_user_info_for_reply(TALLOC_CTX *mem_ctx,
 
        DATA_BLOB local_lm_blob;
        DATA_BLOB local_nt_blob;
-       NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
+       NTSTATUS ret;
        char *plaintext_password_string;
        /*
         * Not encrypted - do so.
@@ -2002,7 +2002,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
                                struct auth_serversupplied_info **server_info,
                                const struct netr_SamInfo3 *info3)
 {
-       NTSTATUS nt_status = NT_STATUS_OK;
+       NTSTATUS nt_status;
        char *found_username = NULL;
        const char *nt_domain;
        const char *nt_username;