summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-07 13:31:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:26 -0500
commit6cf69fee189857ae6f85cd3f81a6a58364839942 (patch)
tree06d80ff7f9c730a0ae70526f94d88acea800eccd /source4/librpc/rpc
parentbd5a802a26f427779663a3de5f6d49f352b7c473 (diff)
downloadsamba-6cf69fee189857ae6f85cd3f81a6a58364839942.tar.gz
samba-6cf69fee189857ae6f85cd3f81a6a58364839942.tar.bz2
samba-6cf69fee189857ae6f85cd3f81a6a58364839942.zip
r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa1ed5ae726bae8781ec549302786b39)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c2
-rw-r--r--source4/librpc/rpc/dcerpc_smb.c20
-rw-r--r--source4/librpc/rpc/dcerpc_smb2.c12
-rw-r--r--source4/librpc/rpc/dcerpc_sock.c10
4 files changed, 22 insertions, 22 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 984cc20fbc..160b9772f4 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -959,7 +959,7 @@ static struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
req->recv_handler = NULL;
if (object != NULL) {
- req->object = talloc_memdup(req, object, sizeof(*object));
+ req->object = talloc_memdup(req, (void *)object, sizeof(*object));
if (req->object == NULL) {
talloc_free(req);
return NULL;
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c
index 5064e998dd..f629410bf1 100644
--- a/source4/librpc/rpc/dcerpc_smb.c
+++ b/source4/librpc/rpc/dcerpc_smb.c
@@ -39,7 +39,7 @@ struct smb_private {
*/
static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status)
{
- struct smb_private *smb = c->transport.private_data;
+ struct smb_private *smb = (struct smb_private *)c->transport.private_data;
if (smb->dead) {
return;
@@ -141,7 +141,7 @@ static void smb_read_callback(struct smbcli_request *req)
*/
static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLOB *blob)
{
- struct smb_private *smb = c->transport.private_data;
+ struct smb_private *smb = (struct smb_private *)c->transport.private_data;
union smb_read *io;
struct smb_read_state *state;
struct smbcli_request *req;
@@ -197,7 +197,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO
*/
static NTSTATUS send_read_request(struct dcerpc_connection *c)
{
- struct smb_private *smb = c->transport.private_data;
+ struct smb_private *smb = (struct smb_private *)c->transport.private_data;
if (smb->dead) {
return NT_STATUS_CONNECTION_DISCONNECTED;
@@ -220,7 +220,7 @@ struct smb_trans_state {
*/
static void smb_trans_callback(struct smbcli_request *req)
{
- struct smb_trans_state *state = req->async.private;
+ struct smb_trans_state *state = (struct smb_trans_state *)req->async.private;
struct dcerpc_connection *c = state->c;
NTSTATUS status;
@@ -249,7 +249,7 @@ static void smb_trans_callback(struct smbcli_request *req)
*/
static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *blob)
{
- struct smb_private *smb = c->transport.private_data;
+ struct smb_private *smb = (struct smb_private *)c->transport.private_data;
struct smb_trans2 *trans;
uint16_t setup[2];
struct smb_trans_state *state;
@@ -297,7 +297,7 @@ static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *b
*/
static void smb_write_callback(struct smbcli_request *req)
{
- struct dcerpc_connection *c = req->async.private;
+ struct dcerpc_connection *c = (struct dcerpc_connection *)req->async.private;
if (!NT_STATUS_IS_OK(req->status)) {
DEBUG(0,("dcerpc_smb: write callback error\n"));
@@ -312,7 +312,7 @@ static void smb_write_callback(struct smbcli_request *req)
*/
static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, BOOL trigger_read)
{
- struct smb_private *smb = c->transport.private_data;
+ struct smb_private *smb = (struct smb_private *)c->transport.private_data;
union smb_write io;
struct smbcli_request *req;
@@ -356,7 +356,7 @@ static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, B
*/
static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status)
{
- struct smb_private *smb = c->transport.private_data;
+ struct smb_private *smb = (struct smb_private *)c->transport.private_data;
union smb_close io;
struct smbcli_request *req;
@@ -382,7 +382,7 @@ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status)
*/
static const char *smb_peer_name(struct dcerpc_connection *c)
{
- struct smb_private *smb = c->transport.private_data;
+ struct smb_private *smb = (struct smb_private *)c->transport.private_data;
return smb->server_name;
}
@@ -400,7 +400,7 @@ static const char *smb_target_hostname(struct dcerpc_connection *c)
*/
static NTSTATUS smb_session_key(struct dcerpc_connection *c, DATA_BLOB *session_key)
{
- struct smb_private *smb = c->transport.private_data;
+ struct smb_private *smb = (struct smb_private *)c->transport.private_data;
if (smb->tree->session->user_session_key.data) {
*session_key = smb->tree->session->user_session_key;
diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c
index dcfee1f223..615c96c905 100644
--- a/source4/librpc/rpc/dcerpc_smb2.c
+++ b/source4/librpc/rpc/dcerpc_smb2.c
@@ -41,7 +41,7 @@ struct smb2_private {
*/
static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status)
{
- struct smb2_private *smb = c->transport.private_data;
+ struct smb2_private *smb = (struct smb2_private *)c->transport.private_data;
if (smb->dead) {
return;
@@ -145,7 +145,7 @@ static void smb2_read_callback(struct smb2_request *req)
*/
static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLOB *blob)
{
- struct smb2_private *smb = c->transport.private_data;
+ struct smb2_private *smb = (struct smb2_private *)c->transport.private_data;
struct smb2_read io;
struct smb2_read_state *state;
struct smb2_request *req;
@@ -190,7 +190,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO
*/
static NTSTATUS send_read_request(struct dcerpc_connection *c)
{
- struct smb2_private *smb = c->transport.private_data;
+ struct smb2_private *smb = (struct smb2_private *)c->transport.private_data;
if (smb->dead) {
return NT_STATUS_CONNECTION_DISCONNECTED;
@@ -280,7 +280,7 @@ static NTSTATUS smb2_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *
*/
static void smb2_write_callback(struct smb2_request *req)
{
- struct dcerpc_connection *c = req->async.private;
+ struct dcerpc_connection *c = (struct dcerpc_connection *)req->async.private;
if (!NT_STATUS_IS_OK(req->status)) {
DEBUG(0,("dcerpc_smb2: write callback error\n"));
@@ -296,7 +296,7 @@ static void smb2_write_callback(struct smb2_request *req)
static NTSTATUS smb2_send_request(struct dcerpc_connection *c, DATA_BLOB *blob,
BOOL trigger_read)
{
- struct smb2_private *smb = c->transport.private_data;
+ struct smb2_private *smb = (struct smb2_private *)c->transport.private_data;
struct smb2_write io;
struct smb2_request *req;
@@ -328,7 +328,7 @@ static NTSTATUS smb2_send_request(struct dcerpc_connection *c, DATA_BLOB *blob,
*/
static NTSTATUS smb2_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status)
{
- struct smb2_private *smb = c->transport.private_data;
+ struct smb2_private *smb = (struct smb2_private *)c->transport.private_data;
struct smb2_close io;
struct smb2_request *req;
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c
index a5abf9b4be..974cbd2692 100644
--- a/source4/librpc/rpc/dcerpc_sock.c
+++ b/source4/librpc/rpc/dcerpc_sock.c
@@ -45,7 +45,7 @@ struct sock_private {
*/
static void sock_dead(struct dcerpc_connection *p, NTSTATUS status)
{
- struct sock_private *sock = p->transport.private_data;
+ struct sock_private *sock = (struct sock_private *)p->transport.private_data;
if (!sock) return;
@@ -111,7 +111,7 @@ static NTSTATUS sock_process_recv(void *private, DATA_BLOB blob)
{
struct dcerpc_connection *p = talloc_get_type(private,
struct dcerpc_connection);
- struct sock_private *sock = p->transport.private_data;
+ struct sock_private *sock = (struct sock_private *)p->transport.private_data;
sock->pending_reads--;
if (sock->pending_reads == 0) {
packet_recv_disable(sock->packet);
@@ -128,7 +128,7 @@ static void sock_io_handler(struct event_context *ev, struct fd_event *fde,
{
struct dcerpc_connection *p = talloc_get_type(private,
struct dcerpc_connection);
- struct sock_private *sock = p->transport.private_data;
+ struct sock_private *sock = (struct sock_private *)p->transport.private_data;
if (flags & EVENT_FD_WRITE) {
packet_queue_run(sock->packet);
@@ -149,7 +149,7 @@ static void sock_io_handler(struct event_context *ev, struct fd_event *fde,
*/
static NTSTATUS sock_send_read(struct dcerpc_connection *p)
{
- struct sock_private *sock = p->transport.private_data;
+ struct sock_private *sock = (struct sock_private *)p->transport.private_data;
sock->pending_reads++;
if (sock->pending_reads == 1) {
packet_recv_enable(sock->packet);
@@ -163,7 +163,7 @@ static NTSTATUS sock_send_read(struct dcerpc_connection *p)
static NTSTATUS sock_send_request(struct dcerpc_connection *p, DATA_BLOB *data,
BOOL trigger_read)
{
- struct sock_private *sock = p->transport.private_data;
+ struct sock_private *sock = (struct sock_private *)p->transport.private_data;
DATA_BLOB blob;
NTSTATUS status;