summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-08-17 14:28:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:41 -0500
commit08e308fe2cdf6b9c7d7c96f3e29ff7209a4a63a9 (patch)
tree30bef9e6256decfa877d7c61646e72f078464cfb
parentac2fa9f41445d81bb45e385520d0fbba608956b4 (diff)
downloadsamba-08e308fe2cdf6b9c7d7c96f3e29ff7209a4a63a9.tar.gz
samba-08e308fe2cdf6b9c7d7c96f3e29ff7209a4a63a9.tar.bz2
samba-08e308fe2cdf6b9c7d7c96f3e29ff7209a4a63a9.zip
r17590: Some C++ Warnings
(This used to be commit b7ec240880af0072ef20b2c0d688ef3cc386d484)
-rw-r--r--source3/printing/notify.c6
-rw-r--r--source3/printing/nt_printing.c14
-rw-r--r--source3/printing/printing.c12
3 files changed, 16 insertions, 16 deletions
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index f27eb2011f..916ff213cc 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -99,7 +99,7 @@ again:
msg->len, msg->notify.data);
if (buflen != len) {
- buf = TALLOC_REALLOC(send_ctx, buf, len);
+ buf = (char *)TALLOC_REALLOC(send_ctx, buf, len);
if (!buf)
return False;
buflen = len;
@@ -140,7 +140,7 @@ static void print_notify_send_messages_to_printer(const char *printer, unsigned
}
offset += 4; /* For count. */
- buf = TALLOC(send_ctx, offset);
+ buf = (char *)TALLOC(send_ctx, offset);
if (!buf) {
DEBUG(0,("print_notify_send_messages: Out of memory\n"));
talloc_free_children(send_ctx);
@@ -220,7 +220,7 @@ static BOOL copy_notify2_msg( SPOOLSS_NOTIFY_MSG *to, SPOOLSS_NOTIFY_MSG *from )
memcpy( to, from, sizeof(SPOOLSS_NOTIFY_MSG) );
if ( from->len ) {
- to->notify.data = TALLOC_MEMDUP(send_ctx, from->notify.data, from->len );
+ to->notify.data = (char *)TALLOC_MEMDUP(send_ctx, from->notify.data, from->len );
if ( !to->notify.data ) {
DEBUG(0,("copy_notify2_msg: talloc_memdup() of size [%d] failed!\n", from->len ));
return False;
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 4b71f6e0b6..6b71286b1b 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1035,7 +1035,7 @@ static int get_file_version(files_struct *fsp, char *fname,uint32 *major, uint32
char *buf = NULL;
ssize_t byte_count;
- if ((buf=SMB_MALLOC(PE_HEADER_SIZE)) == NULL) {
+ if ((buf=(char *)SMB_MALLOC(PE_HEADER_SIZE)) == NULL) {
DEBUG(0,("get_file_version: PE file [%s] PE Header malloc failed bytes = %d\n",
fname, PE_HEADER_SIZE));
goto error_exit;
@@ -1091,7 +1091,7 @@ static int get_file_version(files_struct *fsp, char *fname,uint32 *major, uint32
goto error_exit;
SAFE_FREE(buf);
- if ((buf=SMB_MALLOC(section_table_bytes)) == NULL) {
+ if ((buf=(char *)SMB_MALLOC(section_table_bytes)) == NULL) {
DEBUG(0,("get_file_version: PE file [%s] section table malloc failed bytes = %d\n",
fname, section_table_bytes));
goto error_exit;
@@ -1115,7 +1115,7 @@ static int get_file_version(files_struct *fsp, char *fname,uint32 *major, uint32
goto error_exit;
SAFE_FREE(buf);
- if ((buf=SMB_MALLOC(section_bytes)) == NULL) {
+ if ((buf=(char *)SMB_MALLOC(section_bytes)) == NULL) {
DEBUG(0,("get_file_version: PE file [%s] version malloc failed bytes = %d\n",
fname, section_bytes));
goto error_exit;
@@ -1175,7 +1175,7 @@ static int get_file_version(files_struct *fsp, char *fname,uint32 *major, uint32
/* Allocate a bit more space to speed up things */
SAFE_FREE(buf);
- if ((buf=SMB_MALLOC(VS_NE_BUF_SIZE)) == NULL) {
+ if ((buf=(char *)SMB_MALLOC(VS_NE_BUF_SIZE)) == NULL) {
DEBUG(0,("get_file_version: NE file [%s] malloc failed bytes = %d\n",
fname, PE_HEADER_SIZE));
goto error_exit;
@@ -2083,7 +2083,7 @@ static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **in
memset(info.dependentfiles, '\0', 2*sizeof(fstring));
fstrcpy(info.dependentfiles[0], "");
- *info_ptr = memdup(&info, sizeof(info));
+ *info_ptr = (NT_PRINTER_DRIVER_INFO_LEVEL_3 *)memdup(&info, sizeof(info));
if (!*info_ptr) {
SAFE_FREE(info.dependentfiles);
return WERR_NOMEM;
@@ -2555,7 +2555,7 @@ NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode)
new_nt_devicemode->nt_dev_private = NULL;
if (nt_devicemode->nt_dev_private != NULL) {
- if ((new_nt_devicemode->nt_dev_private = memdup(nt_devicemode->nt_dev_private, nt_devicemode->driverextra)) == NULL) {
+ if ((new_nt_devicemode->nt_dev_private = (uint8 *)memdup(nt_devicemode->nt_dev_private, nt_devicemode->driverextra)) == NULL) {
SAFE_FREE(new_nt_devicemode);
DEBUG(0,("dup_nt_devicemode: malloc fail.\n"));
return NULL;
@@ -3039,7 +3039,7 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
/* We use ldap_get_dn here as we need the answer
* in utf8 to call ldap_explode_dn(). JRA. */
- srv_dn_utf8 = ldap_get_dn(ads->ld, res);
+ srv_dn_utf8 = ldap_get_dn((LDAP *)ads->ld, (LDAPMessage *)res);
if (!srv_dn_utf8) {
ads_destroy(&ads);
return WERR_SERVER_UNAVAILABLE;
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index fbb8166565..0d9ae02545 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -271,7 +271,7 @@ static TDB_DATA print_key(uint32 jobid)
TDB_DATA ret;
SIVAL(&j, 0, jobid);
- ret.dptr = (void *)&j;
+ ret.dptr = (char *)&j;
ret.dsize = sizeof(j);
return ret;
}
@@ -917,7 +917,7 @@ static void set_updating_pid(const fstring sharename, BOOL updating)
}
SIVAL( buffer, 0, updating_pid);
- data.dptr = (void *)buffer;
+ data.dptr = (char *)buffer;
data.dsize = 4; /* we always assume this is a 4 byte value */
tdb_store(pdb->tdb, key, data, TDB_REPLACE);
@@ -984,7 +984,7 @@ static void store_queue_struct(struct tdb_print_db *pdb, struct traverse_struct
queue[i].fs_file);
}
- if ((data.dptr = SMB_MALLOC(data.dsize)) == NULL)
+ if ((data.dptr = (char *)SMB_MALLOC(data.dsize)) == NULL)
return;
len = 0;
@@ -1235,7 +1235,7 @@ static void print_queue_update_internal( const char *sharename,
key.dsize = strlen(keystr);
status.qcount = qcount;
- data.dptr = (void *)&status;
+ data.dptr = (char *)&status;
data.dsize = sizeof(status);
tdb_store(pdb->tdb, key, data, TDB_REPLACE);
@@ -1357,7 +1357,7 @@ static void print_queue_receive(int msg_type, struct process_id src,
int printing_type;
size_t len;
- len = tdb_unpack( buf, msglen, "fdPP",
+ len = tdb_unpack( (char *)buf, msglen, "fdPP",
sharename,
&printing_type,
lpqcommand,
@@ -1605,7 +1605,7 @@ BOOL print_notify_register_pid(int snum)
if (i == data.dsize) {
/* We weren't in the list. Realloc. */
- data.dptr = SMB_REALLOC(data.dptr, data.dsize + 8);
+ data.dptr = (char *)SMB_REALLOC(data.dptr, data.dsize + 8);
if (!data.dptr) {
DEBUG(0,("print_notify_register_pid: Relloc fail for printer %s\n",
printername));