svn commit: samba r7602 - in branches/SAMBA_4_0/source/lib/ldb: common ldb_ldap ldb_tdb

derrell at samba.org derrell at samba.org
Wed Jun 15 02:45:12 GMT 2005


Author: derrell
Date: 2005-06-15 02:45:11 +0000 (Wed, 15 Jun 2005)
New Revision: 7602

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

Log:
fix some compiler warnings
Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c	2005-06-15 02:43:42 UTC (rev 7601)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c	2005-06-15 02:45:11 UTC (rev 7602)
@@ -443,7 +443,7 @@
 			       el2->values,
 			       sizeof(struct ldb_val) * el2->num_values);
 			el1->num_values += el2->num_values;
-			talloc_free(el2->name);
+			talloc_free(discard_const_p(char, el2->name));
 			if (i+1<msg2->num_elements) {
 				memmove(el2, el2+1, sizeof(struct ldb_message_element) * 
 					(msg2->num_elements - (i+1)));

Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c	2005-06-15 02:43:42 UTC (rev 7601)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c	2005-06-15 02:45:11 UTC (rev 7602)
@@ -351,7 +351,7 @@
 				break;
 			}
 		}
-		mods[num_mods]->mod_type = el->name;
+		mods[num_mods]->mod_type = discard_const_p(char, el->name);
 		mods[num_mods]->mod_vals.modv_bvals = talloc_array(mods[num_mods], 
 								     struct berval *,
 								     1+el->num_values);

Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c	2005-06-15 02:43:42 UTC (rev 7601)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c	2005-06-15 02:45:11 UTC (rev 7602)
@@ -169,7 +169,7 @@
 				talloc_free(ret);
 				return NULL;				
 			}
-			talloc_free(el2.name);
+			talloc_free(discard_const_p(char, el2.name));
 			continue;
 		}
 



More information about the samba-cvs mailing list