From: Amos Jeffries Date: Thu, 29 Oct 2009 07:58:04 +0000 (+1300) Subject: Fix some castings caught by gcc4.3 X-Git-Tag: SQUID_3_1_0_15~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00b291e9d9d12500bb54a6536a61df7b168a4b70;p=thirdparty%2Fsquid.git Fix some castings caught by gcc4.3 --- diff --git a/helpers/basic_auth/LDAP/squid_ldap_auth.c b/helpers/basic_auth/LDAP/squid_ldap_auth.c index 2e36ca66b9..80142bf144 100644 --- a/helpers/basic_auth/LDAP/squid_ldap_auth.c +++ b/helpers/basic_auth/LDAP/squid_ldap_auth.c @@ -176,7 +176,7 @@ squid_ldap_set_aliasderef(LDAP * ld, int deref) static void squid_ldap_set_referrals(LDAP * ld, int referrals) { - int *value = referrals ? LDAP_OPT_ON :LDAP_OPT_OFF; + int *value = static_cast(referrals ? LDAP_OPT_ON :LDAP_OPT_OFF); ldap_set_option(ld, LDAP_OPT_REFERRALS, value); } static void @@ -385,7 +385,7 @@ main(int argc, char **argv) case 'h': if (ldapServer) { int len = strlen(ldapServer) + 1 + strlen(value) + 1; - char *newhost = malloc(len); + char *newhost = static_cast(malloc(len)); snprintf(newhost, len, "%s %s", ldapServer, value); free(ldapServer); ldapServer = newhost; @@ -505,7 +505,7 @@ main(int argc, char **argv) char *value = argv[1]; if (ldapServer) { int len = strlen(ldapServer) + 1 + strlen(value) + 1; - char *newhost = malloc(len); + char *newhost = static_cast(malloc(len)); snprintf(newhost, len, "%s %s", ldapServer, value); free(ldapServer); ldapServer = newhost;