svn commit: samba r16661 - in branches/SAMBA_3_0/source: include locking

jra at samba.org jra at samba.org
Wed Jun 28 22:33:13 GMT 2006


Author: jra
Date: 2006-06-28 22:33:10 +0000 (Wed, 28 Jun 2006)
New Revision: 16661

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

Log:
Fix from jason at ncac.gwu.edu for bug #3875,
bad cast warning.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/locking/locking.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/smb.h
===================================================================
--- branches/SAMBA_3_0/source/include/smb.h	2006-06-28 22:33:05 UTC (rev 16660)
+++ branches/SAMBA_3_0/source/include/smb.h	2006-06-28 22:33:10 UTC (rev 16661)
@@ -869,6 +869,12 @@
 				 enum brl_flavour lock_flav, \
 				 br_off start, br_off size)
 
+#define LOCKING_FN_CAST() \
+	void (*)(struct share_mode_entry *, const char *, const char *)
+
+#define LOCKING_FN(fn) \
+	void (*fn)(struct share_mode_entry *, const char *, const char *)
+
 struct bitmap {
 	uint32 *b;
 	unsigned int n;

Modified: branches/SAMBA_3_0/source/locking/locking.c
===================================================================
--- branches/SAMBA_3_0/source/locking/locking.c	2006-06-28 22:33:05 UTC (rev 16660)
+++ branches/SAMBA_3_0/source/locking/locking.c	2006-06-28 22:33:10 UTC (rev 16661)
@@ -1274,7 +1274,7 @@
 	const char *sharepath;
 	const char *fname;
 	int i;
-	void (*traverse_callback)(struct share_mode_entry *, const char *, const char *) = state;
+	LOCKING_FN(traverse_callback) = (LOCKING_FN_CAST())state;
 
 	/* Ensure this is a locking_key record. */
 	if (kbuf.dsize != sizeof(struct locking_key))



More information about the samba-cvs mailing list