From b42d93f24f26c9ac80cfcae0596987eb2769f263 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 10 Nov 2006 10:39:54 +0000 Subject: [PATCH] ITS#3755 silence strict-aliasing warnings --- clients/tools/ldapsearch.c | 2 +- libraries/libldap/cyrus.c | 8 ++++---- libraries/libldap/getdn.c | 4 ++-- servers/slapd/sasl.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 174633e410..50053514c9 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -920,7 +920,7 @@ getNextPage: char *realbase = base; if ( realbase == NULL ) { - ldap_get_option( ld, LDAP_OPT_DEFBASE, (void **)&realbase ); + ldap_get_option( ld, LDAP_OPT_DEFBASE, (void **)(char *)&realbase ); } printf( "#\n" ); diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 7ffc8007ba..ed1e06ec0d 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -165,7 +165,7 @@ sb_sasl_setup( Sockbuf_IO_Desc *sbiod, void *arg ) return -1; } sasl_getprop( p->sasl_context, SASL_MAXOUTBUF, - (SASL_CONST void **) &p->sasl_maxbuf ); + (SASL_CONST void **)(char *) &p->sasl_maxbuf ); sbiod->sbiod_pvt = p; @@ -847,7 +847,7 @@ ldap_int_sasl_bind( if( flags != LDAP_SASL_QUIET ) { saslrc = sasl_getprop( ctx, SASL_USERNAME, - (SASL_CONST void **) &data ); + (SASL_CONST void **)(char *) &data ); if( saslrc == SASL_OK && data && *data ) { fprintf( stderr, "SASL username: %s\n", data ); } @@ -861,7 +861,7 @@ ldap_int_sasl_bind( #endif } - saslrc = sasl_getprop( ctx, SASL_SSF, (SASL_CONST void **) &ssf ); + saslrc = sasl_getprop( ctx, SASL_SSF, (SASL_CONST void **)(char *) &ssf ); if( saslrc == SASL_OK ) { if( flags != LDAP_SASL_QUIET ) { fprintf( stderr, "SASL SSF: %lu\n", @@ -1158,7 +1158,7 @@ ldap_int_sasl_get_option( LDAP *ld, int option, void *arg ) } sc = sasl_getprop( ctx, SASL_SSF, - (SASL_CONST void **) &ssf ); + (SASL_CONST void **)(char *) &ssf ); if ( sc != SASL_OK ) { return -1; diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 651a05425b..74f1365247 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -3370,7 +3370,7 @@ ldap_X509dn2bv( void *x509_name, struct berval *bv, LDAPDN_rewrite_func *func, if ( newDN == NULL ) return LDAP_NO_MEMORY; } else { - newDN = (LDAPDN)ptrs; + newDN = (LDAPDN)(char *)ptrs; } newDN[nrdns] = NULL; @@ -3502,7 +3502,7 @@ nomem: if ( oidsize != 0 ) LDAP_FREE( oidbuf ); - if ( newDN != (LDAPDN) ptrs ) + if ( newDN != (LDAPDN)(char *) ptrs ) LDAP_FREE( newDN ); return rc; } diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index 484300bf6f..b765b044b7 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -1534,7 +1534,7 @@ slap_sasl_setpass( Operation *op, SlapReply *rs ) assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->ore_reqoid ) == 0 ); rs->sr_err = sasl_getprop( op->o_conn->c_sasl_authctx, SASL_USERNAME, - (SASL_CONST void **)&id.bv_val ); + (SASL_CONST void **)(char *)&id.bv_val ); if( rs->sr_err != SASL_OK ) { rs->sr_text = "unable to retrieve SASL username"; -- 2.39.5