Author: vlendec
Date: 2006-08-29 19:14:25 +0000 (Tue, 29 Aug 2006)
New Revision: 17924

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

Log:
Get rid of warnings now that talloc is merged.

Destructors now take a pointer to the "real" destroyed object as an argument.

Volker


Modified:
   branches/SAMBA_3_0/source/auth/auth_util.c
   branches/SAMBA_3_0/source/lib/events.c
   branches/SAMBA_3_0/source/lib/smbldap.c
   branches/SAMBA_3_0/source/locking/brlock.c
   branches/SAMBA_3_0/source/locking/locking.c
   branches/SAMBA_3_0/source/passdb/passdb.c
   branches/SAMBA_3_0/source/utils/netlookup.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_util.c  2006-08-29 17:17:02 UTC (rev 
17923)
+++ branches/SAMBA_3_0/source/auth/auth_util.c  2006-08-29 19:14:25 UTC (rev 
17924)
@@ -513,11 +513,8 @@
        return token;
 }
 
-static int server_info_dtor(void *p)
+static int server_info_dtor(auth_serversupplied_info *server_info)
 {
-       auth_serversupplied_info *server_info =
-               talloc_get_type_abort(p, auth_serversupplied_info);
-
        if (server_info->sam_account != NULL) {
                TALLOC_FREE(server_info->sam_account);
        }

Modified: branches/SAMBA_3_0/source/lib/events.c
===================================================================
--- branches/SAMBA_3_0/source/lib/events.c      2006-08-29 17:17:02 UTC (rev 
17923)
+++ branches/SAMBA_3_0/source/lib/events.c      2006-08-29 19:14:25 UTC (rev 
17924)
@@ -23,9 +23,8 @@
 
 static struct timed_event *timed_events;
 
-static int timed_event_destructor(void *p)
+static int timed_event_destructor(struct timed_event *te)
 {
-       struct timed_event *te = talloc_get_type_abort(p, struct timed_event);
        DEBUG(10, ("Destroying timed event %lx \"%s\"\n", (unsigned long)te,
                te->event_name));
        DLIST_REMOVE(timed_events, te);

Modified: branches/SAMBA_3_0/source/lib/smbldap.c
===================================================================
--- branches/SAMBA_3_0/source/lib/smbldap.c     2006-08-29 17:17:02 UTC (rev 
17923)
+++ branches/SAMBA_3_0/source/lib/smbldap.c     2006-08-29 19:14:25 UTC (rev 
17924)
@@ -340,8 +340,7 @@
        return result;
 }
 
- static int ldapmsg_destructor(void *p) {
-       LDAPMessage **result = talloc_get_type_abort(p, LDAPMessage *);
+ static int ldapmsg_destructor(LDAPMessage **result) {
        ldap_msgfree(*result);
        return 0;
 }
@@ -361,9 +360,8 @@
        talloc_set_destructor(handle, ldapmsg_destructor);
 }
 
- static int ldapmod_destructor(void *p) {
-       LDAPMod ***result = talloc_get_type_abort(p, LDAPMod **);
-       ldap_mods_free(*result, True);
+ static int ldapmod_destructor(LDAPMod ***mod) {
+       ldap_mods_free(*mod, True);
        return 0;
 }
 

Modified: branches/SAMBA_3_0/source/locking/brlock.c
===================================================================
--- branches/SAMBA_3_0/source/locking/brlock.c  2006-08-29 17:17:02 UTC (rev 
17923)
+++ branches/SAMBA_3_0/source/locking/brlock.c  2006-08-29 19:14:25 UTC (rev 
17924)
@@ -1492,10 +1492,8 @@
  Unlock the record.
 ********************************************************************/
 
-static int byte_range_lock_destructor(void *p)
+static int byte_range_lock_destructor(struct byte_range_lock *br_lck)
 {
-       struct byte_range_lock *br_lck =
-               talloc_get_type_abort(p, struct byte_range_lock);
        TDB_DATA key;
 
        key.dptr = (char *)&br_lck->key;

Modified: branches/SAMBA_3_0/source/locking/locking.c
===================================================================
--- branches/SAMBA_3_0/source/locking/locking.c 2006-08-29 17:17:02 UTC (rev 
17923)
+++ branches/SAMBA_3_0/source/locking/locking.c 2006-08-29 19:14:25 UTC (rev 
17924)
@@ -672,10 +672,8 @@
        return result;
 }
 
-static int share_mode_lock_destructor(void *p)
+static int share_mode_lock_destructor(struct share_mode_lock *lck)
 {
-       struct share_mode_lock *lck =
-               talloc_get_type_abort(p, struct share_mode_lock);
        TDB_DATA key = locking_key(lck->dev, lck->ino);
        TDB_DATA data;
 

Modified: branches/SAMBA_3_0/source/passdb/passdb.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/passdb.c   2006-08-29 17:17:02 UTC (rev 
17923)
+++ branches/SAMBA_3_0/source/passdb/passdb.c   2006-08-29 19:14:25 UTC (rev 
17924)
@@ -50,10 +50,8 @@
 /**********************************************************************
 ***********************************************************************/
 
-static int samu_destroy(void *p) 
+static int samu_destroy(struct samu *user) 
 {
-       struct samu *user = (struct samu *)p;
-
        data_blob_clear_free( &user->lm_pw );
        data_blob_clear_free( &user->nt_pw );
 

Modified: branches/SAMBA_3_0/source/utils/netlookup.c
===================================================================
--- branches/SAMBA_3_0/source/utils/netlookup.c 2006-08-29 17:17:02 UTC (rev 
17923)
+++ branches/SAMBA_3_0/source/utils/netlookup.c 2006-08-29 19:14:25 UTC (rev 
17924)
@@ -41,7 +41,7 @@
  Close connection on context destruction.
 ********************************************************/
 
-static int cs_destructor(void *p)
+static int cs_destructor(struct con_struct *p)
 {
        if (cs->cli) {
                cli_shutdown(cs->cli);

Reply via email to