mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
Remove various unused variables
This commit is contained in:
parent
69a53fa499
commit
6492012e00
@ -2347,7 +2347,6 @@ print_syncstate( LDAP *ld, LDAPControl *ctrl )
|
||||
char buf[LDAP_LUTIL_UUIDSTR_BUFSIZE], *uuidstr = "(UUID malformed)";
|
||||
BerElement *ber;
|
||||
ber_tag_t tag;
|
||||
ber_len_t len;
|
||||
ber_int_t state;
|
||||
int rc;
|
||||
|
||||
@ -2422,7 +2421,6 @@ print_syncdone( LDAP *ld, LDAPControl *ctrl )
|
||||
{
|
||||
BerElement *ber;
|
||||
struct berval cookie = BER_BVNULL;
|
||||
ber_tag_t tag;
|
||||
ber_len_t len;
|
||||
ber_int_t refreshDeletes = 0;
|
||||
|
||||
|
@ -479,7 +479,7 @@ handle_private_option( int i )
|
||||
pagedResults = 1 + crit;
|
||||
|
||||
} else if ( strcasecmp( control, "ps" ) == 0 ) {
|
||||
int num, tmp;
|
||||
int num;
|
||||
/* PersistentSearch control */
|
||||
if ( psearch != 0 ) {
|
||||
fprintf( stderr,
|
||||
@ -785,7 +785,6 @@ handle_private_option( int i )
|
||||
|
||||
#ifdef LDAP_CONTROL_X_SHOW_DELETED
|
||||
} else if ( strcasecmp( control, "showDeleted" ) == 0 ) {
|
||||
int num, tmp;
|
||||
if( showDeleted ) {
|
||||
fprintf( stderr,
|
||||
_("showDeleted control previously specified\n"));
|
||||
@ -802,7 +801,6 @@ handle_private_option( int i )
|
||||
|
||||
#ifdef LDAP_CONTROL_X_SERVER_NOTIFICATION
|
||||
} else if ( strcasecmp( control, "serverNotif" ) == 0 ) {
|
||||
int num, tmp;
|
||||
if( serverNotif ) {
|
||||
fprintf( stderr,
|
||||
_("serverNotif control previously specified\n"));
|
||||
|
@ -1897,7 +1897,6 @@ ldif_tool_entry_modify( BackendDB *be, Entry *e, struct berval *text )
|
||||
static int
|
||||
ldif_tool_entry_delete( BackendDB *be, struct berval *ndn, struct berval *text )
|
||||
{
|
||||
struct ldif_tool *tl = &((struct ldif_info *) be->be_private)->li_tool;
|
||||
int rc = LDAP_SUCCESS;
|
||||
const char *errmsg = NULL;
|
||||
struct berval path;
|
||||
|
@ -82,14 +82,11 @@ monitor_cache_add(
|
||||
Entry *e )
|
||||
{
|
||||
monitor_cache_t *mc;
|
||||
monitor_entry_t *mp;
|
||||
int rc;
|
||||
|
||||
assert( mi != NULL );
|
||||
assert( e != NULL );
|
||||
|
||||
mp = ( monitor_entry_t *)e->e_private;
|
||||
|
||||
mc = ( monitor_cache_t * )ch_malloc( sizeof( monitor_cache_t ) );
|
||||
mc->mc_ndn = e->e_nname;
|
||||
mc->mc_e = e;
|
||||
|
@ -4857,7 +4857,6 @@ config_rename_one( Operation *op, SlapReply *rs, Entry *e,
|
||||
CfEntryInfo *parent, Attribute *a, struct berval *newrdn,
|
||||
struct berval *nnewrdn, int use_ldif )
|
||||
{
|
||||
char *ptr1;
|
||||
int cnt, rc = 0;
|
||||
struct berval odn, ondn;
|
||||
const char *text = "";
|
||||
@ -6508,7 +6507,7 @@ config_back_modrdn( Operation *op, SlapReply *rs )
|
||||
}
|
||||
op->oq_modrdn = modr;
|
||||
} else {
|
||||
CfEntryInfo *ce2, *cebase, **cprev, **cbprev, *ceold;
|
||||
CfEntryInfo *ce2, **cprev, **cbprev, *ceold;
|
||||
req_modrdn_s modr = op->oq_modrdn;
|
||||
int i;
|
||||
|
||||
@ -6523,7 +6522,6 @@ config_back_modrdn( Operation *op, SlapReply *rs )
|
||||
cprev = &ce2->ce_sibs;
|
||||
ce2 = ce2->ce_sibs;
|
||||
}
|
||||
cebase = ce2;
|
||||
cbprev = cprev;
|
||||
|
||||
/* Remove from old slot */
|
||||
@ -6880,11 +6878,8 @@ config_build_entry( Operation *op, SlapReply *rs, CfEntryInfo *parent,
|
||||
{
|
||||
Entry *e = entry_alloc();
|
||||
CfEntryInfo *ce = ch_calloc( 1, sizeof(CfEntryInfo) );
|
||||
struct berval val;
|
||||
struct berval ad_name;
|
||||
AttributeDescription *ad = NULL;
|
||||
int cnt, rc;
|
||||
char *ptr;
|
||||
const char *text = "";
|
||||
Attribute *oc_at;
|
||||
struct berval pdn;
|
||||
@ -7201,7 +7196,7 @@ config_back_db_open( BackendDB *be, ConfigReply *cr )
|
||||
{
|
||||
CfBackInfo *cfb = be->be_private;
|
||||
struct berval rdn;
|
||||
Entry *e, *parent;
|
||||
Entry *e;
|
||||
CfEntryInfo *ce, *ceparent;
|
||||
int i, unsupp = 0;
|
||||
BackendInfo *bi;
|
||||
@ -7261,7 +7256,6 @@ config_back_db_open( BackendDB *be, ConfigReply *cr )
|
||||
ce = e->e_private;
|
||||
cfb->cb_root = ce;
|
||||
|
||||
parent = e;
|
||||
ceparent = ce;
|
||||
|
||||
#ifdef SLAPD_MODULES
|
||||
@ -7648,7 +7642,7 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
|
||||
CfBackInfo *cfb = be->be_private;
|
||||
BackendInfo *bi = cfb->cb_db.bd_info;
|
||||
int rc;
|
||||
struct berval rdn, vals[ 2 ];
|
||||
struct berval rdn;
|
||||
ConfigArgs ca;
|
||||
OperationBuffer opbuf;
|
||||
Entry *ce;
|
||||
@ -7668,8 +7662,6 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
|
||||
strncmp( e->e_nname.bv_val +
|
||||
STRLENOF( "olcDatabase" ), "=frontend",
|
||||
STRLENOF( "=frontend" ))) {
|
||||
vals[1].bv_len = 0;
|
||||
vals[1].bv_val = NULL;
|
||||
memset( &ca, 0, sizeof(ConfigArgs));
|
||||
ca.be = frontendDB;
|
||||
ca.bi = frontendDB->bd_info;
|
||||
@ -7746,8 +7738,6 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
|
||||
strncmp( e->e_nname.bv_val +
|
||||
STRLENOF( "olcDatabase" ), "=config",
|
||||
STRLENOF( "=config" )) ) {
|
||||
vals[1].bv_len = 0;
|
||||
vals[1].bv_val = NULL;
|
||||
memset( &ca, 0, sizeof(ConfigArgs));
|
||||
ca.be = LDAP_STAILQ_FIRST( &backendDB );
|
||||
ca.bi = ca.be->bd_info;
|
||||
@ -7800,7 +7790,6 @@ config_tool_entry_modify( BackendDB *be, Entry *e, struct berval *text )
|
||||
CfBackInfo *cfb = be->be_private;
|
||||
BackendInfo *bi = cfb->cb_db.bd_info;
|
||||
CfEntryInfo *ce, *last;
|
||||
ConfigArgs ca = {0};
|
||||
|
||||
ce = config_find_base( cfb->cb_root, &e->e_nname, &last );
|
||||
|
||||
@ -7816,7 +7805,6 @@ config_tool_entry_delete( BackendDB *be, struct berval *ndn, struct berval *text
|
||||
CfBackInfo *cfb = be->be_private;
|
||||
BackendInfo *bi = cfb->cb_db.bd_info;
|
||||
CfEntryInfo *ce, *last;
|
||||
ConfigArgs ca = {0};
|
||||
|
||||
ce = config_find_base( cfb->cb_root, ndn, &last );
|
||||
|
||||
|
@ -210,7 +210,7 @@ int connections_shutdown(void)
|
||||
*/
|
||||
int connections_timeout_idle(time_t now)
|
||||
{
|
||||
int i = 0, writers = 0;
|
||||
int i = 0;
|
||||
ber_socket_t connindex;
|
||||
Connection* c;
|
||||
|
||||
|
@ -2461,7 +2461,6 @@ slapd_daemon_task(
|
||||
time_t last_idle_check = 0;
|
||||
int ebadf = 0;
|
||||
int tid = (slap_daemon_st *) ptr - slap_daemon;
|
||||
int old_threads = slapd_daemon_threads;
|
||||
char ebuf[128];
|
||||
|
||||
#define SLAPD_IDLE_CHECK_LIMIT 4
|
||||
|
Loading…
Reference in New Issue
Block a user