svn commit: samba r17590 - in branches/SAMBA_3_0/source/printing: .

vlendec at samba.org vlendec at samba.org
Thu Aug 17 14:28:04 GMT 2006


Author: vlendec
Date: 2006-08-17 14:28:03 +0000 (Thu, 17 Aug 2006)
New Revision: 17590

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

Log:
Some C++ Warnings
Modified:
   branches/SAMBA_3_0/source/printing/notify.c
   branches/SAMBA_3_0/source/printing/nt_printing.c
   branches/SAMBA_3_0/source/printing/printing.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/notify.c
===================================================================
--- branches/SAMBA_3_0/source/printing/notify.c	2006-08-17 13:46:02 UTC (rev 17589)
+++ branches/SAMBA_3_0/source/printing/notify.c	2006-08-17 14:28:03 UTC (rev 17590)
@@ -99,7 +99,7 @@
 				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 @@
 	}
 	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 @@
 	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;

Modified: branches/SAMBA_3_0/source/printing/nt_printing.c
===================================================================
--- branches/SAMBA_3_0/source/printing/nt_printing.c	2006-08-17 13:46:02 UTC (rev 17589)
+++ branches/SAMBA_3_0/source/printing/nt_printing.c	2006-08-17 14:28:03 UTC (rev 17590)
@@ -1035,7 +1035,7 @@
 	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 @@
 			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 @@
 					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 @@
 
 		/* 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 @@
 	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 @@
 
 	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 @@
 	/* 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;

Modified: branches/SAMBA_3_0/source/printing/printing.c
===================================================================
--- branches/SAMBA_3_0/source/printing/printing.c	2006-08-17 13:46:02 UTC (rev 17589)
+++ branches/SAMBA_3_0/source/printing/printing.c	2006-08-17 14:28:03 UTC (rev 17590)
@@ -271,7 +271,7 @@
 	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 @@
 	}
 	
 	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 @@
 				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 @@
 	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 @@
 	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 @@
 
 	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));



More information about the samba-cvs mailing list