summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-08-17 11:54:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:41 -0500
commit0691ed55cade8093213db38555edb536ee0c557d (patch)
treed4c196a01a7d5851f365940c77a8d3813e9db811
parentaa2138ed5badedc5754978b61db1042617857690 (diff)
downloadsamba-0691ed55cade8093213db38555edb536ee0c557d.tar.gz
samba-0691ed55cade8093213db38555edb536ee0c557d.tar.bz2
samba-0691ed55cade8093213db38555edb536ee0c557d.zip
r17584: Some C++ Warnings
(This used to be commit f6194cf4b263454bbdf180a7d014ffc3498df497)
-rw-r--r--source3/auth/auth_script.c2
-rw-r--r--source3/lib/talloctort.c6
-rw-r--r--source3/nsswitch/pam_winbind.c2
-rw-r--r--source3/sam/idmap_rid.c6
-rw-r--r--source3/utils/log2pcaphex.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/source3/auth/auth_script.c b/source3/auth/auth_script.c
index ec7264924c..70c906d942 100644
--- a/source3/auth/auth_script.c
+++ b/source3/auth/auth_script.c
@@ -69,7 +69,7 @@ static NTSTATUS script_check_user_credentials(const struct auth_context *auth_co
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;
}
diff --git a/source3/lib/talloctort.c b/source3/lib/talloctort.c
index 3ce45e2071..460360613c 100644
--- a/source3/lib/talloctort.c
+++ b/source3/lib/talloctort.c
@@ -403,7 +403,7 @@ static BOOL test_misc(void)
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 @@ static BOOL test_misc(void)
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 @@ static BOOL test_misc(void)
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);
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c
index 1aef5c6c4a..f2dacf241e 100644
--- a/source3/nsswitch/pam_winbind.c
+++ b/source3/nsswitch/pam_winbind.c
@@ -1036,7 +1036,7 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
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 */
diff --git a/source3/sam/idmap_rid.c b/source3/sam/idmap_rid.c
index 23496d6969..63167accf3 100644
--- a/source3/sam/idmap_rid.c
+++ b/source3/sam/idmap_rid.c
@@ -196,9 +196,9 @@ static NTSTATUS rid_idmap_get_domains(uint32 *num_domains, fstring **domain_name
}
/* 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) {
diff --git a/source3/utils/log2pcaphex.c b/source3/utils/log2pcaphex.c
index 24412cbe85..aa68cf09c9 100644
--- a/source3/utils/log2pcaphex.c
+++ b/source3/utils/log2pcaphex.c
@@ -142,7 +142,7 @@ void print_netbios_packet(FILE *out, unsigned char *data, long length, long actu
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 @@ void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *dat
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;