From: Amos Jeffries Date: Wed, 10 Nov 2010 11:49:28 +0000 (+1300) Subject: ext_edirectory_acl: min() template requires identical type. cast to size_t X-Git-Tag: take1~92 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=706628b0e5dad6ace7d0dcec062cceac41b13064;p=thirdparty%2Fsquid.git ext_edirectory_acl: min() template requires identical type. cast to size_t --- diff --git a/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc b/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc index 84be30db6a..bcccf57d6a 100644 --- a/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc +++ b/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc @@ -1427,7 +1427,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid) /* We got a match! - Scan 'ber' for 'cn' values */ z = ldap_count_values_len(ber); for (j = 0; j < z; j++) - xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),ber[j]->bv_len)); + xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),static_cast(ber[j]->bv_len))); ldap_value_free_len(l->val); l->val = NULL; ldap_value_free_len(ber); @@ -1459,7 +1459,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid) /* We got a match! - Scan 'ber' for 'cn' values */ z = ldap_count_values_len(ber); for (j = 0; j < z; j++) - xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),ber[j]->bv_len)); + xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),static_cast(ber[j]->bv_len))); ldap_value_free_len(l->val); l->val = NULL; ldap_value_free_len(ber); @@ -1491,7 +1491,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid) /* We got a match! - Scan 'ber' for 'cn' values */ z = ldap_count_values_len(ber); for (j = 0; j < z; j++) - xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),ber[j]->bv_len)); + xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),static_cast(ber[j]->bv_len))); ldap_value_free_len(l->val); l->val = NULL; ldap_value_free_len(ber); @@ -1523,7 +1523,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid) /* We got a match! - Scan 'ber' for 'cn' values */ z = ldap_count_values_len(ber); for (j = 0; j < z; j++) - xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),ber[j]->bv_len)); + xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),static_cast(ber[j]->bv_len))); ldap_value_free_len(l->val); l->val = NULL; ldap_value_free_len(ber); @@ -1555,7 +1555,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid) /* We got a match! - Scan 'ber' for 'cn' values */ z = ldap_count_values_len(ber); for (j = 0; j < z; j++) - xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),ber[j]->bv_len)); + xstrncpy(uid, ber[j]->bv_val, min(sizeof(uid),static_cast(ber[j]->bv_len))); ldap_value_free_len(l->val); l->val = NULL; ldap_value_free_len(ber);