svn commit: samba r17452 - in branches/SAMBA_3_0/source: locking smbd

vlendec at samba.org vlendec at samba.org
Tue Aug 8 09:56:38 GMT 2006


Author: vlendec
Date: 2006-08-08 09:56:38 +0000 (Tue, 08 Aug 2006)
New Revision: 17452

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

Log:
Some C++ warnings
Modified:
   branches/SAMBA_3_0/source/locking/brlock.c
   branches/SAMBA_3_0/source/locking/posix.c
   branches/SAMBA_3_0/source/smbd/oplock.c


Changeset:
Modified: branches/SAMBA_3_0/source/locking/brlock.c
===================================================================
--- branches/SAMBA_3_0/source/locking/brlock.c	2006-08-08 08:26:40 UTC (rev 17451)
+++ branches/SAMBA_3_0/source/locking/brlock.c	2006-08-08 09:56:38 UTC (rev 17452)
@@ -1002,7 +1002,8 @@
 
 	br_lck->num_locks = count;
 	SAFE_FREE(br_lck->lock_data);
-	locks = br_lck->lock_data = (void *)tp;
+	locks = tp;
+	br_lck->lock_data = (void *)tp;
 	br_lck->modified = True;
 
 	/* Send unlock messages to any pending waiters that overlap. */
@@ -1279,7 +1280,7 @@
 			unsigned int num_locks_copy;
 
 			/* Copy the current lock array. */
-			locks_copy = TALLOC_MEMDUP(br_lck, locks, br_lck->num_locks * sizeof(struct lock_struct));
+			locks_copy = (struct lock_struct *)TALLOC_MEMDUP(br_lck, locks, br_lck->num_locks * sizeof(struct lock_struct));
 			if (!locks_copy) {
 				smb_panic("brl_close_fnum: talloc fail.\n");
 			}

Modified: branches/SAMBA_3_0/source/locking/posix.c
===================================================================
--- branches/SAMBA_3_0/source/locking/posix.c	2006-08-08 08:26:40 UTC (rev 17451)
+++ branches/SAMBA_3_0/source/locking/posix.c	2006-08-08 09:56:38 UTC (rev 17452)
@@ -573,7 +573,7 @@
 
 	dbuf = tdb_fetch(posix_pending_close_tdb, kbuf);
 
-	dbuf.dptr = SMB_REALLOC(dbuf.dptr, dbuf.dsize + sizeof(int));
+	dbuf.dptr = (char *)SMB_REALLOC(dbuf.dptr, dbuf.dsize + sizeof(int));
 	if (!dbuf.dptr) {
 		smb_panic("add_fd_to_close_entry: Realloc fail !\n");
 	}

Modified: branches/SAMBA_3_0/source/smbd/oplock.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/oplock.c	2006-08-08 08:26:40 UTC (rev 17451)
+++ branches/SAMBA_3_0/source/smbd/oplock.c	2006-08-08 09:56:38 UTC (rev 17452)
@@ -346,7 +346,7 @@
 				   const struct timeval *now,
 				   void *private_data)
 {
-	files_struct *fsp = private_data;
+	files_struct *fsp = (files_struct *)private_data;
 
 	DEBUG(0, ("Oplock break failed for file %s -- replying anyway\n", fsp->fsp_name));
 	global_client_failed_oplock_break = True;
@@ -403,7 +403,7 @@
 	}
 
 	/* De-linearize incoming message. */
-	message_to_share_mode_entry(&msg, buf);
+	message_to_share_mode_entry(&msg, (char *)buf);
 
 	DEBUG(10, ("Got oplock async level 2 break message from pid %d: 0x%x/%.0f/%lu\n",
 		   (int)procid_to_pid(&src), (unsigned int)msg.dev,
@@ -490,7 +490,7 @@
 	}
 
 	/* De-linearize incoming message. */
-	message_to_share_mode_entry(&msg, buf);
+	message_to_share_mode_entry(&msg, (char *)buf);
 
 	DEBUG(10, ("Got oplock break message from pid %d: 0x%x/%.0f/%lu\n",
 		   (int)procid_to_pid(&src), (unsigned int)msg.dev,
@@ -685,7 +685,7 @@
 	}
 
 	/* De-linearize incoming message. */
-	message_to_share_mode_entry(&msg, buf);
+	message_to_share_mode_entry(&msg, (char *)buf);
 
 	DEBUG(10, ("Got oplock break response from pid %d: 0x%x/%.0f/%lu mid %u\n",
 		   (int)procid_to_pid(&src), (unsigned int)msg.dev,
@@ -712,7 +712,7 @@
 	}
 
 	/* De-linearize incoming message. */
-	message_to_share_mode_entry(&msg, buf);
+	message_to_share_mode_entry(&msg, (char *)buf);
 
 	DEBUG(10, ("Got open retry msg from pid %d: 0x%x/%.0f/%lu mid %u\n",
 		   (int)procid_to_pid(&src), (unsigned int)msg.dev,



More information about the samba-cvs mailing list