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

source3/auth/auth.c:38:35: warning: Value stored to 'entry' during its initialization is never read <--[clang]
        struct auth_init_function_entry *entry = auth_backends;
                                         ^~~~~   ~~~~~~~~~~~~~
1 warning generated.

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

index ce2cb0d75bf922a9e24488a5fe0b08e1baa7c52f..3b523c0fa180b1ca0a36bc6432f6e12058560bdf 100644 (file)
@@ -35,7 +35,7 @@ static struct auth_init_function_entry *auth_find_backend_entry(const char *name
 
 NTSTATUS smb_register_auth(int version, const char *name, auth_init_function init)
 {
-       struct auth_init_function_entry *entry = auth_backends;
+       struct auth_init_function_entry *entry = NULL;
 
        if (version != AUTH_INTERFACE_VERSION) {
                DEBUG(0,("Can't register auth_method!\n"