svn commit: samba r17584 - in branches/SAMBA_3_0/source: auth lib nsswitch sam utils

vlendec at samba.org vlendec at samba.org
Thu Aug 17 11:54:24 GMT 2006


Author: vlendec
Date: 2006-08-17 11:54:23 +0000 (Thu, 17 Aug 2006)
New Revision: 17584

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

Log:
Some C++ Warnings
Modified:
   branches/SAMBA_3_0/source/auth/auth_script.c
   branches/SAMBA_3_0/source/lib/talloctort.c
   branches/SAMBA_3_0/source/nsswitch/pam_winbind.c
   branches/SAMBA_3_0/source/sam/idmap_rid.c
   branches/SAMBA_3_0/source/utils/log2pcaphex.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_script.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_script.c	2006-08-17 10:01:48 UTC (rev 17583)
+++ branches/SAMBA_3_0/source/auth/auth_script.c	2006-08-17 11:54:23 UTC (rev 17584)
@@ -69,7 +69,7 @@
 			48 + 1 + /* 24 bytes of challenge going to 48 */
 			48 + 1;
 
-	secret_str = malloc(secret_str_len);
+	secret_str = (char *)malloc(secret_str_len);
 	if (!secret_str) {
 		return NT_STATUS_NO_MEMORY;
 	}

Modified: branches/SAMBA_3_0/source/lib/talloctort.c
===================================================================
--- branches/SAMBA_3_0/source/lib/talloctort.c	2006-08-17 10:01:48 UTC (rev 17583)
+++ branches/SAMBA_3_0/source/lib/talloctort.c	2006-08-17 11:54:23 UTC (rev 17584)
@@ -403,7 +403,7 @@
 	talloc_report(root, stdout);
 
 
-	p2 = talloc_zero_size(p1, 20);
+	p2 = (char *)talloc_zero_size(p1, 20);
 	if (p2[19] != 0) {
 		printf("Failed to give zero memory\n");
 		return False;
@@ -465,7 +465,7 @@
 	talloc_unlink(NULL, p1);
 
 	p1 = talloc_named_const(root, 10, "p1");
-	p2 = talloc_named_const(root, 20, "p2");
+	p2 = (char *)talloc_named_const(root, 20, "p2");
 	talloc_reference(p1, p2);
 	talloc_report_full(root, stdout);
 	talloc_unlink(root, p2);
@@ -477,7 +477,7 @@
 	talloc_unlink(root, p1);
 
 	p1 = talloc_named_const(root, 10, "p1");
-	p2 = talloc_named_const(root, 20, "p2");
+	p2 = (char *)talloc_named_const(root, 20, "p2");
 	talloc_reference(NULL, p2);
 	talloc_report_full(root, stdout);
 	talloc_unlink(root, p2);

Modified: branches/SAMBA_3_0/source/nsswitch/pam_winbind.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/pam_winbind.c	2006-08-17 10:01:48 UTC (rev 17583)
+++ branches/SAMBA_3_0/source/nsswitch/pam_winbind.c	2006-08-17 11:54:23 UTC (rev 17584)
@@ -1036,7 +1036,7 @@
 	case 0:
 		pam_get_data( pamh, PAM_WINBIND_NEW_AUTHTOK_REQD, (const void **)&tmp);
 		if (tmp != NULL) {
-			retval = atoi(tmp);
+			retval = atoi((const char *)tmp);
 			switch (retval) {
 			case PAM_AUTHTOK_EXPIRED:
 				/* fall through, since new token is required in this case */

Modified: branches/SAMBA_3_0/source/sam/idmap_rid.c
===================================================================
--- branches/SAMBA_3_0/source/sam/idmap_rid.c	2006-08-17 10:01:48 UTC (rev 17583)
+++ branches/SAMBA_3_0/source/sam/idmap_rid.c	2006-08-17 11:54:23 UTC (rev 17584)
@@ -196,9 +196,9 @@
 	}
 
 	/* open a connection to the dc */
-	username = secrets_fetch(SECRETS_AUTH_USER, NULL);
-	password = secrets_fetch(SECRETS_AUTH_PASSWORD, NULL);
-	domain =   secrets_fetch(SECRETS_AUTH_DOMAIN, NULL);
+	username = (char *)secrets_fetch(SECRETS_AUTH_USER, NULL);
+	password = (char *)secrets_fetch(SECRETS_AUTH_PASSWORD, NULL);
+	domain =   (char *)secrets_fetch(SECRETS_AUTH_DOMAIN, NULL);
 
 	if (username) {
 

Modified: branches/SAMBA_3_0/source/utils/log2pcaphex.c
===================================================================
--- branches/SAMBA_3_0/source/utils/log2pcaphex.c	2006-08-17 10:01:48 UTC (rev 17583)
+++ branches/SAMBA_3_0/source/utils/log2pcaphex.c	2006-08-17 11:54:23 UTC (rev 17584)
@@ -142,7 +142,7 @@
 	long newlen;
 	
 	newlen = length+sizeof(HDR_IP)+sizeof(HDR_TCP);
-	newdata = malloc(newlen);
+	newdata = (unsigned char *)malloc(newlen);
 
 	HDR_IP.packet_length = htons(newlen);
 	HDR_TCP.window = htons(0x2000);
@@ -165,7 +165,7 @@
 	int tmp; long i;
 	assert(fscanf(in, " size=%ld\n", buffersize));
 	*buffersize+=4; /* for netbios */
-	buffer = malloc(*buffersize);
+	buffer = (unsigned char *)malloc(*buffersize);
 	memset(buffer, 0, *buffersize);
 	/* NetBIOS */
 	buffer[0] = 0x00;



More information about the samba-cvs mailing list