mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
silence warnings
This commit is contained in:
parent
ceb9c15bdd
commit
9129a2f7ee
@ -559,7 +559,7 @@ ber_get_next(
|
||||
|
||||
/* Now look for the length */
|
||||
if (*ber->ber_ptr & 0x80) { /* multi-byte */
|
||||
ber_len_t i;
|
||||
int i;
|
||||
unsigned char *p = (unsigned char *)ber->ber_ptr;
|
||||
int llen = *p++ & 0x7f;
|
||||
if (llen > (int)sizeof(ber_len_t)) {
|
||||
|
@ -209,7 +209,8 @@ ldap_pvt_connect(LDAP *ld, ber_socket_t s,
|
||||
int async)
|
||||
{
|
||||
int rc;
|
||||
struct timeval tv, *opt_tv=NULL;
|
||||
struct timeval tv = { 0 },
|
||||
*opt_tv = NULL;
|
||||
|
||||
#ifdef LDAP_CONNECTIONLESS
|
||||
/* We could do a connect() but that would interfere with
|
||||
@ -223,9 +224,9 @@ ldap_pvt_connect(LDAP *ld, ber_socket_t s,
|
||||
return ( 0 );
|
||||
}
|
||||
#endif
|
||||
if ( (opt_tv = ld->ld_options.ldo_tm_net) != NULL ) {
|
||||
tv.tv_usec = opt_tv->tv_usec;
|
||||
tv.tv_sec = opt_tv->tv_sec;
|
||||
opt_tv = ld->ld_options.ldo_tm_net;
|
||||
if ( opt_tv != NULL ) {
|
||||
tv = *opt_tv;
|
||||
}
|
||||
|
||||
osip_debug(ld, "ldap_connect_timeout: fd: %d tm: %ld async: %d\n",
|
||||
|
@ -167,11 +167,12 @@ static int
|
||||
ldap_pvt_connect(LDAP *ld, ber_socket_t s, struct sockaddr_un *sa, int async)
|
||||
{
|
||||
int rc;
|
||||
struct timeval tv, *opt_tv=NULL;
|
||||
struct timeval tv = { 0 },
|
||||
*opt_tv = NULL;
|
||||
|
||||
if ( (opt_tv = ld->ld_options.ldo_tm_net) != NULL ) {
|
||||
tv.tv_usec = opt_tv->tv_usec;
|
||||
tv.tv_sec = opt_tv->tv_sec;
|
||||
opt_tv = ld->ld_options.ldo_tm_net;
|
||||
if ( opt_tv != NULL ) {
|
||||
tv = *opt_tv;
|
||||
}
|
||||
|
||||
oslocal_debug(ld, "ldap_connect_timeout: fd: %d tm: %ld async: %d\n",
|
||||
|
@ -251,7 +251,9 @@ wait4msg(
|
||||
LDAPMessage **result )
|
||||
{
|
||||
int rc;
|
||||
struct timeval tv, tv0, *tvp;
|
||||
struct timeval tv = { 0 },
|
||||
tv0 = { 0 },
|
||||
*tvp;
|
||||
time_t start_time = 0;
|
||||
time_t tmp_time;
|
||||
LDAPConn *lc, *nextlc;
|
||||
@ -281,9 +283,9 @@ wait4msg(
|
||||
rc = -2;
|
||||
while ( rc == -2 ) {
|
||||
#ifdef LDAP_DEBUG
|
||||
Debug( LDAP_DEBUG_TRACE, "wait4msg continue, msgid %d, all %d\n",
|
||||
msgid, all, 0 );
|
||||
if ( ldap_debug & LDAP_DEBUG_TRACE ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "wait4msg continue, msgid %d, all %d\n",
|
||||
msgid, all, 0 );
|
||||
ldap_dump_connection( ld, ld->ld_conns, 1 );
|
||||
ldap_dump_requests_and_responses( ld );
|
||||
}
|
||||
@ -360,7 +362,8 @@ wait4msg(
|
||||
|
||||
if ( rc == -2 && tvp != NULL ) {
|
||||
tmp_time = time( NULL );
|
||||
if (( tv0.tv_sec -= ( tmp_time - start_time )) <= 0 ) {
|
||||
tv0.tv_sec -= ( tmp_time - start_time );
|
||||
if ( tv0.tv_sec <= 0 ) {
|
||||
rc = 0; /* timed out */
|
||||
ld->ld_errno = LDAP_TIMEOUT;
|
||||
break;
|
||||
@ -1070,7 +1073,7 @@ int
|
||||
ldap_msgtype( LDAPMessage *lm )
|
||||
{
|
||||
assert( lm != NULL );
|
||||
return ( lm != NULL ) ? lm->lm_msgtype : -1;
|
||||
return ( lm != NULL ) ? (int)lm->lm_msgtype : -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -204,7 +204,7 @@ int lutil_parsetime( char *atm, struct lutil_tm *tm )
|
||||
{
|
||||
while (atm && tm) {
|
||||
char *ptr = atm;
|
||||
int i, fracs;
|
||||
unsigned i, fracs;
|
||||
|
||||
/* Is the stamp reasonably long? */
|
||||
for (i=0; isdigit(atm[i]); i++);
|
||||
|
@ -851,7 +851,8 @@ slap_acl_get(
|
||||
continue;
|
||||
|
||||
} else if ( a->acl_dn_style == ACL_STYLE_ONE ) {
|
||||
int rdnlen = -1, sep = 0;
|
||||
ber_len_t rdnlen = 0;
|
||||
int sep = 0;
|
||||
|
||||
if ( dnlen <= patlen )
|
||||
continue;
|
||||
@ -942,7 +943,7 @@ slap_acl_get(
|
||||
continue;
|
||||
|
||||
} else if ( a->acl_attrval_style == ACL_STYLE_ONE ) {
|
||||
int rdnlen = -1;
|
||||
ber_len_t rdnlen = 0;
|
||||
|
||||
if ( !DN_SEPARATOR( val->bv_val[vdnlen - patlen - 1] ) )
|
||||
continue;
|
||||
@ -1186,7 +1187,7 @@ acl_mask_dn(
|
||||
}
|
||||
|
||||
} else if ( b->a_style == ACL_STYLE_ONE ) {
|
||||
int rdnlen = -1;
|
||||
ber_len_t rdnlen = 0;
|
||||
|
||||
if ( odnlen <= patlen ) {
|
||||
goto dn_match_cleanup;
|
||||
|
@ -267,7 +267,7 @@ regex_done:;
|
||||
sep = 1;
|
||||
}
|
||||
|
||||
rdnlen = (ber_len_t)dn_rdnlen( NULL, &dn );
|
||||
rdnlen = dn_rdnlen( NULL, &dn );
|
||||
if ( rdnlen != dn.bv_len - patlen - sep )
|
||||
return ACL_SCOPE_ERR;
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ int
|
||||
meta_back_open(
|
||||
BackendInfo *bi )
|
||||
{
|
||||
/* FIXME: need to remove the pagedResults, and likely more... */
|
||||
bi->bi_controls = slap_known_controls;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1207,7 +1207,7 @@ dnExtractRdn(
|
||||
/*
|
||||
* We can assume the input is a prettied or normalized DN
|
||||
*/
|
||||
int
|
||||
ber_len_t
|
||||
dn_rdnlen(
|
||||
Backend *be,
|
||||
struct berval *dn_in )
|
||||
|
@ -783,7 +783,7 @@ LDAP_SLAPD_F (int) dnExtractRdn LDAP_P((
|
||||
|
||||
LDAP_SLAPD_F (int) rdn_validate LDAP_P(( struct berval * rdn ));
|
||||
|
||||
LDAP_SLAPD_F (int) dn_rdnlen LDAP_P(( Backend *be, struct berval *dn ));
|
||||
LDAP_SLAPD_F (ber_len_t) dn_rdnlen LDAP_P(( Backend *be, struct berval *dn ));
|
||||
|
||||
LDAP_SLAPD_F (void) build_new_dn LDAP_P((
|
||||
struct berval * new_dn,
|
||||
|
Loading…
Reference in New Issue
Block a user