Skip to content

Commit

Permalink
s3/passdb: clang: Fix 'Value stored during initialization is never read'
Browse files Browse the repository at this point in the history
Fixes:

source3/passdb/pdb_interface.c:65:34: warning: Value stored to 'entry' during its initialization is never read <--[clang]
        struct pdb_init_function_entry *entry = backends;
                                        ^~~~~   ~~~~~~~~

/source3/passdb/pdb_interface.c:140:11: warning: Value stored to 'nt_status' during its initialization is never read <--[clang]
        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Signed-off-by: Noel Power <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
noelpower authored and jrasamba committed Sep 26, 2019
1 parent 2d47067 commit 299eff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source3/passdb/pdb_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32_t rid,

NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init)
{
struct pdb_init_function_entry *entry = backends;
struct pdb_init_function_entry *entry = NULL;

if(version != PASSDB_INTERFACE_VERSION) {
DEBUG(0,("Can't register passdb backend!\n"
Expand Down Expand Up @@ -137,7 +137,7 @@ NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected
char *module_name = smb_xstrdup(selected);
char *module_location = NULL, *p;
struct pdb_init_function_entry *entry;
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
NTSTATUS nt_status;

lazy_initialize_passdb();

Expand Down

0 comments on commit 299eff4

Please sign in to comment.