svn commit: samba r10220 - in trunk/source: lib libads param passdb

jra at samba.org jra at samba.org
Wed Sep 14 01:32:39 GMT 2005


Author: jra
Date: 2005-09-14 01:32:37 +0000 (Wed, 14 Sep 2005)
New Revision: 10220

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10220

Log:
Fix more 64-bit warnings with an ldap configured build.
Inspired by Volker :-).
Jeremy.

Modified:
   trunk/source/lib/smbldap.c
   trunk/source/libads/ldap.c
   trunk/source/param/config_ldap.c
   trunk/source/passdb/pdb_ldap.c


Changeset:
Modified: trunk/source/lib/smbldap.c
===================================================================
--- trunk/source/lib/smbldap.c	2005-09-14 00:57:23 UTC (rev 10219)
+++ trunk/source/lib/smbldap.c	2005-09-14 01:32:37 UTC (rev 10220)
@@ -267,7 +267,11 @@
 		return; 
 
 	while ( list[i] ) {
-		SAFE_FREE( list[i] );
+		/* SAFE_FREE generates a warning here that can't be gotten rid
+		 * of with CONST_DISCARD */
+		if (list[i] != NULL) {
+			free(CONST_DISCARD(char *, list[i]));
+		}
 		i+=1;
 	}
 

Modified: trunk/source/libads/ldap.c
===================================================================
--- trunk/source/libads/ldap.c	2005-09-14 00:57:23 UTC (rev 10219)
+++ trunk/source/libads/ldap.c	2005-09-14 01:32:37 UTC (rev 10220)
@@ -2104,7 +2104,7 @@
 	if ((*num_strings) != range_start) {
 		DEBUG(1, ("ads_pull_strings_range: Range attribute (%s) doesn't start at %u, but at %lu"
 			  " - aborting range retreival\n",
-			  range_attr, *num_strings + 1, range_start));
+			  range_attr, (unsigned int)(*num_strings) + 1, range_start));
 		ldap_memfree(range_attr);
 		*more_strings = False;
 		return NULL;
@@ -2140,7 +2140,7 @@
 		*next_attribute = talloc_asprintf(mem_ctx,
 						  "%s;range=%d-*", 
 						  field,
-						  *num_strings);
+						  (int)*num_strings);
 		
 		if (!*next_attribute) {
 			DEBUG(1, ("talloc_asprintf for next attribute failed!\n"));

Modified: trunk/source/param/config_ldap.c
===================================================================
--- trunk/source/param/config_ldap.c	2005-09-14 00:57:23 UTC (rev 10219)
+++ trunk/source/param/config_ldap.c	2005-09-14 01:32:37 UTC (rev 10220)
@@ -82,7 +82,7 @@
 	pstring filter;
 	pstring option_name;
 	pstring option_value;
-	char **attr_list = NULL;
+	const char **attr_list = NULL;
 	int rc;
 	int count;
 

Modified: trunk/source/passdb/pdb_ldap.c
===================================================================
--- trunk/source/passdb/pdb_ldap.c	2005-09-14 00:57:23 UTC (rev 10219)
+++ trunk/source/passdb/pdb_ldap.c	2005-09-14 01:32:37 UTC (rev 10220)
@@ -834,7 +834,7 @@
 
 	if (ldap_state->is_nds_ldap) {
 		char *user_dn;
-		int pwd_len;
+		size_t pwd_len;
 		char clear_text_pw[512];
    
 		/* Make call to Novell eDirectory ldap extension to get clear text password.



More information about the samba-cvs mailing list