summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-08-08 09:56:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:34 -0500
commit70660495b349cde6245731870d6337eb2800a8ed (patch)
tree3ca12185c375b7f3204a2df237b55ec68a10e031
parentff7c0a7c357ab8a0ff9de6d18988933e0b398780 (diff)
downloadsamba-70660495b349cde6245731870d6337eb2800a8ed.tar.gz
samba-70660495b349cde6245731870d6337eb2800a8ed.tar.bz2
samba-70660495b349cde6245731870d6337eb2800a8ed.zip
r17452: Some C++ warnings
(This used to be commit e4b8c79a9d6f7323953121887af4f482d04a9228)
-rw-r--r--source3/locking/brlock.c5
-rw-r--r--source3/locking/posix.c2
-rw-r--r--source3/smbd/oplock.c10
3 files changed, 9 insertions, 8 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index fd41f75e62..9229d6e6e8 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -1002,7 +1002,8 @@ static BOOL brl_unlock_posix(struct byte_range_lock *br_lck, const struct lock_s
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 @@ void brl_close_fnum(struct byte_range_lock *br_lck)
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");
}
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 586de5745b..8e27d4523b 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -573,7 +573,7 @@ static void add_fd_to_close_entry(files_struct *fsp)
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");
}
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index d9850ee051..eec19259d0 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -346,7 +346,7 @@ static void oplock_timeout_handler(struct timed_event *te,
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 @@ static void process_oplock_async_level2_break_message(int msg_type, struct proce
}
/* 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 @@ static void process_oplock_break_message(int msg_type, struct process_id src,
}
/* 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 @@ static void process_oplock_break_response(int msg_type, struct process_id src,
}
/* 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 @@ static void process_open_retry_message(int msg_type, struct process_id src,
}
/* 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,