1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3/libads: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/libads/ldap.c:370:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
source3/libads/ldap.c:417:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
source3/libads/ldap.c:1783:13: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        ADS_STATUS ret = ADS_ERROR(LDAP_SUCCESS);
                   ^~~   ~~~~~~~~~~~~~~~~~~~~~~~
source3/libads/ldap.c:1862:13: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        ADS_STATUS ret = ADS_ERROR(LDAP_SUCCESS);
                   ^~~   ~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Noel Power 2019-09-17 08:05:28 +00:00 committed by Jeremy Allison
parent a3b9986fac
commit 32d487d074

View File

@ -367,7 +367,7 @@ static NTSTATUS resolve_and_ping_netbios(ADS_STRUCT *ads,
{
int count, i;
struct ip_service *ip_list;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
NTSTATUS status;
DEBUG(6, ("resolve_and_ping_netbios: (cldap) looking for domain '%s'\n",
domain));
@ -414,7 +414,7 @@ static NTSTATUS resolve_and_ping_dns(ADS_STRUCT *ads, const char *sitename,
{
int count;
struct ip_service *ip_list = NULL;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
NTSTATUS status;
DEBUG(6, ("resolve_and_ping_dns: (cldap) looking for realm '%s'\n",
realm));
@ -1780,7 +1780,7 @@ uint32_t ads_get_kvno(ADS_STRUCT *ads, const char *account_name)
char *filter;
const char *attrs[] = {"msDS-KeyVersionNumber", NULL};
char *dn_string = NULL;
ADS_STATUS ret = ADS_ERROR(LDAP_SUCCESS);
ADS_STATUS ret;
DEBUG(5,("ads_get_kvno: Searching for account %s\n", account_name));
if (asprintf(&filter, "(samAccountName=%s)", account_name) == -1) {
@ -1859,7 +1859,7 @@ ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machin
LDAPMessage *res = NULL;
ADS_MODLIST mods;
const char *servicePrincipalName[1] = {NULL};
ADS_STATUS ret = ADS_ERROR(LDAP_SUCCESS);
ADS_STATUS ret;
char *dn_string = NULL;
ret = ads_find_machine_acct(ads, &res, machine_name);