Silence warnings

This commit is contained in:
Hallvard Furuseth 2005-07-14 19:32:21 +00:00
parent 3fd6f18d25
commit 7ab3d2c245
8 changed files with 13 additions and 46 deletions

View File

@ -342,7 +342,6 @@ static struct {
static int
log_age_parse(char *agestr)
{
char *ptr;
int t1, t2;
int gotdays = 0;

View File

@ -164,7 +164,6 @@ static int
glue_op_func ( Operation *op, SlapReply *rs )
{
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
glueinfo *gi = (glueinfo *)on->on_bi.bi_private;
BackendDB *b0 = op->o_bd;
BackendInfo *bi0 = op->o_bd->bd_info;
BI_op_modify **func;
@ -196,7 +195,6 @@ static int
glue_chk_referrals ( Operation *op, SlapReply *rs )
{
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
glueinfo *gi = (glueinfo *)on->on_bi.bi_private;
BackendDB *b0 = op->o_bd;
BackendInfo *bi0 = op->o_bd->bd_info;
int rc;
@ -218,7 +216,6 @@ static int
glue_chk_controls ( Operation *op, SlapReply *rs )
{
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
glueinfo *gi = (glueinfo *)on->on_bi.bi_private;
BackendDB *b0 = op->o_bd;
BackendInfo *bi0 = op->o_bd->bd_info;
int rc = SLAP_CB_CONTINUE;
@ -527,9 +524,8 @@ glue_close (
)
{
slap_overinst *on = glue_tool_inst( bi );
glueinfo *gi = on->on_bi.bi_private;
static int glueClosed = 0;
int i, rc = 0;
int rc = 0;
if (glueClosed) return 0;
@ -803,7 +799,6 @@ glue_db_config(
int i, async = 0, advertise = 0;
BackendDB *b2;
struct berval bv, dn;
gluenode *gn;
if ( argc < 2 ) {
fprintf( stderr, "%s: line %d: too few arguments in "

View File

@ -283,7 +283,6 @@ lastmod_op_func( Operation *op, SlapReply *rs )
{
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
lastmod_info_t *lmi = (lastmod_info_t *)on->on_bi.bi_private;
unsigned i;
Modifications *ml;
if ( dn_match( &op->o_req_ndn, &lmi->lmi_e->e_nname ) ) {
@ -692,7 +691,6 @@ lastmod_response( Operation *op, SlapReply *rs )
{
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
lastmod_info_t *lmi = (lastmod_info_t *)on->on_bi.bi_private;
unsigned int i;
/* don't record failed operations */
switch ( rs->sr_err ) {
@ -730,7 +728,6 @@ lastmod_response( Operation *op, SlapReply *rs )
}
ldap_pvt_thread_mutex_unlock( &lmi->lmi_entry_mutex );
process:;
(void)lastmod_update( op, rs );
return SLAP_CB_CONTINUE;

View File

@ -211,8 +211,6 @@ account_locked( Operation *op, Entry *e,
PassPolicy *pp, Modifications **mod )
{
Attribute *la;
int rc;
Entry *de;
assert(mod);
@ -225,7 +223,6 @@ account_locked( Operation *op, Entry *e,
*/
if (vals[0].bv_val != NULL) {
time_t then, now;
struct berval bv;
Modifications *m;
if (!pp->pwdLockoutDuration)
@ -310,12 +307,11 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
pp_info *pi = on->on_bi.bi_private;
Attribute *a;
BerVarray vals;
int i, rc, nent;
int rc;
Entry *pe = NULL;
AttributeDescription *oca = slap_schema.si_ad_objectClass;
#if 0
const char *text;
AttributeDescription *ad;
struct berval bv;
#endif
memset( pp, 0, sizeof(PassPolicy) );
@ -432,7 +428,6 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
{
int rc = LDAP_SUCCESS, ok = LDAP_SUCCESS;
char *ptr = cred->bv_val;
char *modpath;
struct berval sch;
assert( cred != NULL );
@ -681,10 +676,9 @@ ppolicy_bind_resp( Operation *op, SlapReply *rs )
slap_overinst *on = ppb->on;
Modifications *mod = ppb->mod, *m;
int pwExpired = 0;
int ngut = -1, warn = -1, age, rc, i;
int ngut = -1, warn = -1, age, rc;
Attribute *a;
time_t now, then, pwtime = (time_t)-1;
const char *txt;
time_t now, pwtime = (time_t)-1;
char nowstr[ LDAP_LUTIL_GENTIME_BUFSIZE ];
struct berval timestamp;
BackendInfo *bi = op->o_bd->bd_info;
@ -953,7 +947,7 @@ ppolicy_bind( Operation *op, SlapReply *rs )
/* Root bypasses policy */
if ( !be_isroot_dn( op->o_bd, &op->o_req_ndn )) {
Entry *e;
int i, rc;
int rc;
ppbind *ppb;
slap_callback *cb;
@ -1017,7 +1011,7 @@ ppolicy_restrict(
SlapReply *rs )
{
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
int i, send_ctrl = 0;
int send_ctrl = 0;
/* Did we receive a password policy request control? */
if ( op->o_ctrlflag[ppolicy_cid] ) {
@ -1052,7 +1046,6 @@ ppolicy_add(
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
pp_info *pi = on->on_bi.bi_private;
PassPolicy pp;
int pw;
Attribute *pa;
const char *txt;
@ -1071,7 +1064,7 @@ ppolicy_add(
ppolicy_get( op, op->ora_e, &pp );
if (pp.pwdCheckQuality > 0 && !be_isroot( op )) {
struct berval *bv = &(pa->a_vals[0]);
int rc, i, send_ctrl = 0;
int rc, send_ctrl = 0;
LDAPPasswordPolicyError pErr = PP_noError;
/* Did we receive a password policy request control? */
@ -1149,7 +1142,7 @@ ppolicy_modify( Operation *op, SlapReply *rs )
hsize = 0;
PassPolicy pp;
Modifications *mods = NULL, *modtail, *ml, *delmod, *addmod;
Attribute *pa, *ha, *ra, at;
Attribute *pa, *ha, at;
const char *txt;
pw_hist *tl = NULL, *p;
int zapReset, send_ctrl = 0;
@ -1271,7 +1264,6 @@ ppolicy_modify( Operation *op, SlapReply *rs )
if (pp.pwdInHistory > 0 && (ha = attr_find( e->e_attrs, ad_pwdHistory ))) {
struct berval oldpw;
time_t oldtime;
char *oid;
for(i=0; ha->a_nvals[i].bv_val; i++) {
rc = parse_pwdhistory( &(ha->a_nvals[i]), NULL,
@ -1438,7 +1430,6 @@ do_modify:
struct berval timestamp;
char timebuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
time_t now = slap_get_time();
Attribute *ga;
/*
* keep the necessary pwd.. operational attributes

View File

@ -570,7 +570,7 @@ refint_response(
rc = nop.o_bd->be_search(&nop, &nrs);
ch_free( nop.ors_filterstr.bv_val );
while ( fptr = ftop.f_or ) {
while ( (fptr = ftop.f_or) != NULL ) {
ftop.f_or = fptr->f_next;
ch_free( fptr );
}

View File

@ -258,8 +258,6 @@ static int
rwm_op_bind( Operation *op, SlapReply *rs )
{
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
struct ldaprwmap *rwmap =
(struct ldaprwmap *)on->on_bi.bi_private;
int rc;
#ifdef ENABLE_REWRITE

View File

@ -159,8 +159,6 @@ syncprov_state_ctrl(
{
Attribute* a;
int ret;
int res;
const char *text = NULL;
BerElementBuffer berbuf;
BerElement *ber = (BerElement *)&berbuf;
@ -402,7 +400,6 @@ syncprov_findbase( Operation *op, fbase_cookie *fc )
{
opcookie *opc = op->o_callback->sc_private;
slap_overinst *on = opc->son;
syncprov_info_t *si = on->on_bi.bi_private;
slap_callback cb = {0};
Operation fop;
@ -746,7 +743,6 @@ static int
syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, Entry **e, int mode, int queue )
{
slap_overinst *on = opc->son;
syncprov_info_t *si = on->on_bi.bi_private;
SlapReply rs = { REP_SEARCH };
LDAPControl *ctrls[2];
@ -1231,7 +1227,6 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl,
struct berval *oldcsn, struct berval *ctxcsn )
{
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
syncprov_info_t *si = on->on_bi.bi_private;
slog_entry *se;
int i, j, ndel, num, nmods, mmods;
BerVarray uuids;
@ -1692,11 +1687,9 @@ syncprov_search_response( Operation *op, SlapReply *rs )
{
searchstate *ss = op->o_callback->sc_private;
slap_overinst *on = ss->ss_on;
syncprov_info_t *si = on->on_bi.bi_private;
sync_control *srs = op->o_controls[slap_cids.sc_LDAPsync];
if ( rs->sr_type == REP_SEARCH || rs->sr_type == REP_SEARCHREF ) {
int i;
/* If we got a referral without a referral object, there's
* something missing that we cannot replicate. Just ignore it.
* The consumer will abort because we didn't send the expected

View File

@ -221,7 +221,6 @@ static int translucent_modify(Operation *op, SlapReply *rs) {
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
overlay_stack *ov = on->on_bi.bi_private;
translucent_configuration *cf = ov->config;
void *private = op->o_bd->be_private;
Entry ne, *e, *re = NULL;
Attribute *a, *ax;
@ -393,11 +392,9 @@ static int translucent_compare(Operation *op, SlapReply *rs) {
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
overlay_stack *ov = on->on_bi.bi_private;
void *private = op->o_bd->be_private;
translucent_configuration *cf = ov->config;
AttributeAssertion *ava = op->orc_ava;
Attribute *a, *an, *ra, *as = NULL;
Entry *e, *ee, *re;
Entry *e;
int rc;
Debug(LDAP_DEBUG_TRACE, "==> translucent_compare: <%s> %s:%s\n",
@ -440,9 +437,8 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) {
slap_overinst *on;
Entry *e, *re = NULL;
Attribute *a, *ax, *an, *as = NULL;
BerVarray b, bx;
void *private;
int i, rc, size;
int rc;
if(!op || !rs || rs->sr_type != REP_SEARCH || !rs->sr_entry)
return(SLAP_CB_CONTINUE);
@ -525,7 +521,6 @@ static int translucent_search(Operation *op, SlapReply *rs) {
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
slap_callback cb = { NULL, NULL, NULL, NULL };
overlay_stack *ov = on->on_bi.bi_private;
translucent_configuration *cf = ov->config;
void *private = op->o_bd->be_private;
int rc;
@ -708,7 +703,6 @@ static int translucent_open(BackendDB *be) {
static int translucent_close(BackendDB *be) {
slap_overinst *on = (slap_overinst *) be->bd_info;
overlay_stack *ov = on->on_bi.bi_private;
translucent_configuration *cf = ov->config;
void *private = be->be_private;
int rc;