]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9386 Address compiler warnings
authorOndřej Kuzník <ondra@mistotebe.net>
Mon, 9 Nov 2020 11:50:37 +0000 (11:50 +0000)
committerOndřej Kuzník <ondra@mistotebe.net>
Mon, 9 Nov 2020 11:50:37 +0000 (11:50 +0000)
servers/slapd/overlays/ppolicy.c

index f1243658e99f001b9a335558525bc1e427a72e8c..bdb45a6427420fcd1dc91b9ce0583ba648c795b0 100644 (file)
@@ -865,7 +865,7 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
        pp_info *pi = on->on_bi.bi_private;
        Attribute *a;
        BerVarray vals;
-       int rc;
+       int rc = LDAP_SUCCESS;
        Entry *pe = NULL;
 #if 0
        const char *text;
@@ -1998,7 +1998,6 @@ ppolicy_account_usability_entry_cb( Operation *op, SlapReply *rs )
                                lockoutEnd = then + pp.pwdLockoutDuration;
                }
 
-               a = attr_find( e->e_attrs, ad_pwdAccountLockedTime );
                if ( (a = attr_find( e->e_attrs, ad_pwdAccountTmpLockoutEnd )) != NULL ) {
                        then = parse_time( a->a_vals[0].bv_val );
                        if ( lockoutEnd != -1 && then > lockoutEnd )
@@ -2272,7 +2271,7 @@ ppolicy_modify( Operation *op, SlapReply *rs )
 {
        slap_overinst           *on = (slap_overinst *)op->o_bd->bd_info;
        pp_info                 *pi = on->on_bi.bi_private;
-       int                     i, rc, mod_pw_only, pwmod, pwmop = -1, deladd,
+       int                     i, rc, mod_pw_only, pwmod = 0, pwmop = -1, deladd,
                                hsize = 0, hskip;
        PassPolicy              pp;
        Modifications           *mods = NULL, *modtail = NULL,