From 17853783df9e1881eb8f94373a4d9f4e357c4105 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 4 May 2015 21:07:02 +0200 Subject: [PATCH] Silence warnings --- libraries/libldap/cyrus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index b3beefe620..f073c7735f 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -493,11 +493,12 @@ ldap_int_sasl_bind( if ( ldap_pvt_tls_get_unique( ssl, &cbv, 0 )) { sasl_channel_binding_t *cb = ldap_memalloc( sizeof(*cb) + cbv.bv_len); + void *cb_data; /* used since cb->data is const* */ cb->name = "ldap"; cb->critical = 0; - cb->data = (char *)(cb+1); cb->len = cbv.bv_len; - memcpy( cb->data, cbv.bv_val, cbv.bv_len ); + cb->data = cb_data = cb+1; + memcpy( cb_data, cbv.bv_val, cbv.bv_len ); sasl_setprop( ld->ld_defconn->lconn_sasl_authctx, SASL_CHANNEL_BINDING, cb ); ld->ld_defconn->lconn_sasl_cbind = cb; -- 2.39.5