svn commit: samba r17348 - in branches/SAMBA_3_0/source: rpc_server
smbd
vlendec at samba.org
vlendec at samba.org
Mon Jul 31 21:40:28 GMT 2006
Author: vlendec
Date: 2006-07-31 21:40:25 +0000 (Mon, 31 Jul 2006)
New Revision: 17348
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17348
Log:
Some C++ warnings
Modified:
branches/SAMBA_3_0/source/rpc_server/srv_echo_nt.c
branches/SAMBA_3_0/source/rpc_server/srv_pipe.c
branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
branches/SAMBA_3_0/source/smbd/msdfs.c
branches/SAMBA_3_0/source/smbd/ntquotas.c
branches/SAMBA_3_0/source/smbd/posix_acls.c
branches/SAMBA_3_0/source/smbd/sec_ctx.c
branches/SAMBA_3_0/source/smbd/vfs.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_echo_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_echo_nt.c 2006-07-31 21:11:03 UTC (rev 17347)
+++ branches/SAMBA_3_0/source/rpc_server/srv_echo_nt.c 2006-07-31 21:40:25 UTC (rev 17348)
@@ -44,7 +44,7 @@
{
DEBUG(10, ("_echo_data\n"));
- r_u->data = TALLOC(p->mem_ctx, q_u->size);
+ r_u->data = (char *)TALLOC(p->mem_ctx, q_u->size);
r_u->size = q_u->size;
memcpy(r_u->data, q_u->data, q_u->size);
}
@@ -68,7 +68,7 @@
DEBUG(10, ("_source_data\n"));
- r_u->data = TALLOC(p->mem_ctx, q_u->size);
+ r_u->data = (char *)TALLOC(p->mem_ctx, q_u->size);
r_u->size = q_u->size;
for (i = 0; i < r_u->size; i++)
Modified: branches/SAMBA_3_0/source/rpc_server/srv_pipe.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_pipe.c 2006-07-31 21:11:03 UTC (rev 17347)
+++ branches/SAMBA_3_0/source/rpc_server/srv_pipe.c 2006-07-31 21:40:25 UTC (rev 17348)
@@ -679,8 +679,9 @@
p->pipe_user.ut.ngroups = a->server_info->n_groups;
if (p->pipe_user.ut.ngroups) {
- if (!(p->pipe_user.ut.groups = memdup(a->server_info->groups,
- sizeof(gid_t) * p->pipe_user.ut.ngroups))) {
+ if (!(p->pipe_user.ut.groups = (gid_t *)
+ memdup(a->server_info->groups,
+ sizeof(gid_t) * p->pipe_user.ut.ngroups))) {
DEBUG(0,("pipe_ntlmssp_verify_final: failed to memdup group list to p->pipe_user.groups\n"));
data_blob_free(&p->session_key);
return False;
@@ -2322,7 +2323,7 @@
if ((DEBUGLEVEL >= 10) &&
(prs_offset(&p->in_data.data) != prs_data_size(&p->in_data.data))) {
size_t data_len = prs_data_size(&p->in_data.data) - prs_offset(&p->in_data.data);
- char *data = SMB_MALLOC(data_len);
+ char *data = (char *)SMB_MALLOC(data_len);
DEBUG(10, ("api_rpcTNP: rpc input buffer underflow (parse error?)\n"));
if (data) {
Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2006-07-31 21:11:03 UTC (rev 17347)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2006-07-31 21:40:25 UTC (rev 17348)
@@ -719,7 +719,8 @@
}
data->notify_data.data.length = prs_offset(&ps);
- data->notify_data.data.string = TALLOC(mem_ctx, prs_offset(&ps));
+ data->notify_data.data.string = (uint16 *)
+ TALLOC(mem_ctx, prs_offset(&ps));
if (!data->notify_data.data.string) {
prs_mem_free(&ps);
return;
@@ -911,7 +912,8 @@
/* need to allocate own copy of data */
if ( msg->len != 0 )
- msg_grp->msgs[new_slot].notify.data = TALLOC_MEMDUP( ctr->ctx, msg->notify.data, msg->len );
+ msg_grp->msgs[new_slot].notify.data = (char *)
+ TALLOC_MEMDUP( ctr->ctx, msg->notify.data, msg->len );
return ctr->num_groups;
}
@@ -1220,7 +1222,7 @@
int n_services = lp_numservices();
len = MIN(len,sizeof(drivername)-1);
- strncpy(drivername, buf, len);
+ strncpy(drivername, (const char *)buf, len);
DEBUG(10,("do_drv_upgrade_printer: Got message for new driver [%s]\n", drivername ));
@@ -1318,7 +1320,7 @@
int n_services = lp_numservices();
len = MIN( len, sizeof(drivername)-1 );
- strncpy( drivername, buf, len );
+ strncpy( drivername, (const char *)buf, len );
DEBUG(10,("reset_all_printerdata: Got message for new driver [%s]\n", drivername ));
@@ -1381,7 +1383,7 @@
/* bulk copy first */
- d = TALLOC_MEMDUP(ctx, devmode, sizeof(DEVICEMODE));
+ d = (DEVICEMODE *)TALLOC_MEMDUP(ctx, devmode, sizeof(DEVICEMODE));
if (!d)
return NULL;
@@ -1408,7 +1410,8 @@
return NULL;
}
- d->dev_private = TALLOC_MEMDUP(ctx, devmode->dev_private, devmode->driverextra);
+ d->dev_private = (uint8 *)TALLOC_MEMDUP(ctx, devmode->dev_private,
+ devmode->driverextra);
if (!d->dev_private) {
return NULL;
}
@@ -9046,7 +9049,8 @@
*/
set_printer_dataex( printer, keyname, valuename,
- REG_SZ, (void*)oid_string, strlen(oid_string)+1 );
+ REG_SZ, (uint8 *)oid_string,
+ strlen(oid_string)+1 );
}
status = mod_a_printer(printer, 2);
@@ -9336,7 +9340,7 @@
data_len = regval_size( val );
if ( data_len ) {
- if ( !(enum_values[i].data = TALLOC_MEMDUP(p->mem_ctx, regval_data_p(val), data_len)) )
+ if ( !(enum_values[i].data = (uint8 *)TALLOC_MEMDUP(p->mem_ctx, regval_data_p(val), data_len)) )
{
DEBUG(0,("talloc_memdup failed to allocate memory [data_len=%d] for data!\n",
data_len ));
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/msdfs.c 2006-07-31 21:11:03 UTC (rev 17347)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c 2006-07-31 21:40:25 UTC (rev 17348)
@@ -655,7 +655,7 @@
/* add the unexplained 0x16 bytes */
reply_size += 0x16;
- pdata = SMB_REALLOC(pdata,reply_size);
+ pdata = (char *)SMB_REALLOC(pdata,reply_size);
if(pdata == NULL) {
DEBUG(0,("malloc failed for Realloc!\n"));
return -1;
@@ -740,7 +740,7 @@
reply_size += (strlen(junction->referral_list[i].alternate_path)+1)*2;
}
- pdata = SMB_REALLOC(pdata,reply_size);
+ pdata = (char *)SMB_REALLOC(pdata,reply_size);
if(pdata == NULL) {
DEBUG(0,("version3 referral setup: malloc failed for Realloc!\n"));
return -1;
Modified: branches/SAMBA_3_0/source/smbd/ntquotas.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/ntquotas.c 2006-07-31 21:11:03 UTC (rev 17347)
+++ branches/SAMBA_3_0/source/smbd/ntquotas.c 2006-07-31 21:40:25 UTC (rev 17348)
@@ -244,7 +244,7 @@
if (!pqt_handle||!(*pqt_handle))
return;
- qt_handle = (*pqt_handle);
+ qt_handle = (SMB_NTQUOTA_HANDLE *)(*pqt_handle);
if (qt_handle->quota_list)
Modified: branches/SAMBA_3_0/source/smbd/posix_acls.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/posix_acls.c 2006-07-31 21:11:03 UTC (rev 17347)
+++ branches/SAMBA_3_0/source/smbd/posix_acls.c 2006-07-31 21:40:25 UTC (rev 17348)
@@ -169,7 +169,7 @@
*store_size = PAI_ENTRIES_BASE + ((num_entries + num_def_entries)*PAI_ENTRY_LENGTH);
- pai_buf = SMB_MALLOC(*store_size);
+ pai_buf = (char *)SMB_MALLOC(*store_size);
if (!pai_buf) {
return NULL;
}
@@ -441,7 +441,7 @@
if (!lp_map_acl_inherit(SNUM(fsp->conn)))
return NULL;
- if ((pai_buf = SMB_MALLOC(pai_buf_size)) == NULL)
+ if ((pai_buf = (char *)SMB_MALLOC(pai_buf_size)) == NULL)
return NULL;
do {
@@ -462,7 +462,7 @@
if (pai_buf_size > 1024*1024) {
return NULL; /* Limit malloc to 1mb. */
}
- if ((pai_buf = SMB_MALLOC(pai_buf_size)) == NULL)
+ if ((pai_buf = (char *)SMB_MALLOC(pai_buf_size)) == NULL)
return NULL;
}
} while (ret == -1);
Modified: branches/SAMBA_3_0/source/smbd/sec_ctx.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/sec_ctx.c 2006-07-31 21:11:03 UTC (rev 17347)
+++ branches/SAMBA_3_0/source/smbd/sec_ctx.c 2006-07-31 21:40:25 UTC (rev 17348)
@@ -259,7 +259,8 @@
TALLOC_FREE(ctx_p->token);
if (ngroups) {
- ctx_p->ut.groups = memdup(groups, sizeof(gid_t) * ngroups);
+ ctx_p->ut.groups = (gid_t *)memdup(groups,
+ sizeof(gid_t) * ngroups);
if (!ctx_p->ut.groups) {
smb_panic("memdup failed");
}
Modified: branches/SAMBA_3_0/source/smbd/vfs.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/vfs.c 2006-07-31 21:11:03 UTC (rev 17347)
+++ branches/SAMBA_3_0/source/smbd/vfs.c 2006-07-31 21:40:25 UTC (rev 17348)
@@ -206,8 +206,8 @@
return ext_data;
}
- ext = TALLOC_ZERO(handle->conn->mem_ctx,
- sizeof(struct vfs_fsp_data) + ext_size);
+ ext = (struct vfs_fsp_data *)TALLOC_ZERO(
+ handle->conn->mem_ctx, sizeof(struct vfs_fsp_data) + ext_size);
if (ext == NULL) {
return NULL;
}
@@ -647,7 +647,7 @@
if (!p)
return(NULL);
- ptr = SMB_VFS_READDIR(conn,p);
+ ptr = SMB_VFS_READDIR(conn, (DIR *)p);
if (!ptr)
return(NULL);
More information about the samba-cvs
mailing list