summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/intl/lang_tdb.c4
-rw-r--r--source3/lib/charcnv.c12
-rw-r--r--source3/lib/iconv.c4
-rw-r--r--source3/msdfs/msdfs.c4
-rw-r--r--source3/smbd/dfree.c2
-rw-r--r--source3/smbd/mangle.c1
-rw-r--r--source3/smbd/negprot.c8
-rw-r--r--source3/smbd/sesssetup.c2
8 files changed, 17 insertions, 20 deletions
diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c
index 38bdcdd132..36f8020bbe 100644
--- a/source3/intl/lang_tdb.c
+++ b/source3/intl/lang_tdb.c
@@ -122,7 +122,7 @@ BOOL lang_tdb_init(const char *lang)
/* if no lang then we don't translate */
if (!lang) return True;
- asprintf(&msg_path, "%s.msg", lib_path(lang));
+ asprintf(&msg_path, "%s.msg", lib_path((char *)lang));
if (stat(msg_path, &st) != 0) {
/* the msg file isn't available */
free(msg_path);
@@ -202,7 +202,7 @@ const char *lang_msg_rotate(const char *msgid)
static pstring bufs[NUM_LANG_BUFS];
static int next;
- msgstr = lang_msg(msgid);
+ msgstr = (char *)lang_msg(msgid);
if (!msgstr) return msgid;
pstrcpy(bufs[next], msgstr);
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index b7af6fef4b..d14a1f04e4 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -61,15 +61,15 @@ void init_iconv(void)
for (c1=0;c1<NUM_CHARSETS;c1++) {
for (c2=0;c2<NUM_CHARSETS;c2++) {
- char *n1 = charset_name(c1);
- char *n2 = charset_name(c2);
+ char *n1 = charset_name((charset_t)c1);
+ char *n2 = charset_name((charset_t)c2);
if (conv_handles[c1][c2]) {
smb_iconv_close(conv_handles[c1][c2]);
}
conv_handles[c1][c2] = smb_iconv_open(n2,n1);
if (conv_handles[c1][c2] == (smb_iconv_t)-1) {
DEBUG(0,("Conversion from %s to %s not supported\n",
- charset_name(c1), charset_name(c2)));
+ charset_name((charset_t)c1), charset_name((charset_t)c2)));
conv_handles[c1][c2] = NULL;
}
}
@@ -135,20 +135,18 @@ size_t convert_string(charset_t from, charset_t to,
int unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen)
{
- int size,len;
+ int size;
smb_ucs2_t *buffer=(smb_ucs2_t*)cvtbuf;
size=convert_string(CH_UNIX, CH_UCS2, src, srclen, buffer, sizeof(cvtbuf));
- len=size/2;
if (!strupper_w(buffer) && (dest == src)) return srclen;
return convert_string(CH_UCS2, CH_UNIX, buffer, size, dest, destlen);
}
int unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen)
{
- int size,len;
+ int size;
smb_ucs2_t *buffer=(smb_ucs2_t*)cvtbuf;
size=convert_string(CH_UNIX, CH_UCS2, src, srclen, buffer, sizeof(cvtbuf));
- len=size/2;
if (!strlower_w(buffer) && (dest == src)) return srclen;
return convert_string(CH_UCS2, CH_UNIX, buffer, size, dest, destlen);
}
diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c
index cf9fabf8c6..8bcd92d72a 100644
--- a/source3/lib/iconv.c
+++ b/source3/lib/iconv.c
@@ -86,7 +86,7 @@ size_t smb_iconv(smb_iconv_t cd,
/* in many cases we can go direct */
if (cd->direct) {
return cd->direct(cd->cd_direct,
- inbuf, inbytesleft, outbuf, outbytesleft);
+ (char **)inbuf, inbytesleft, outbuf, outbytesleft);
}
@@ -96,7 +96,7 @@ size_t smb_iconv(smb_iconv_t cd,
bufsize = sizeof(cvtbuf);
if (cd->pull(cd->cd_pull,
- inbuf, inbytesleft, &bufp, &bufsize) == -1
+ (char **)inbuf, inbytesleft, &bufp, &bufsize) == -1
&& errno != E2BIG) return -1;
bufp = cvtbuf;
diff --git a/source3/msdfs/msdfs.c b/source3/msdfs/msdfs.c
index 7ba40a5bd0..f2915606e8 100644
--- a/source3/msdfs/msdfs.c
+++ b/source3/msdfs/msdfs.c
@@ -370,7 +370,7 @@ static int setup_ver2_dfs_referral(char* pathname, char** ppdata,
requestedpathlen = rpcstr_push(uni_requestedpath, pathname, -1,
STR_TERMINATE);
- dump_data(10,uni_requestedpath,requestedpathlen);
+ dump_data(10,(const char *)uni_requestedpath,requestedpathlen);
DEBUG(10,("ref count = %u\n",junction->referral_count));
@@ -464,7 +464,7 @@ static int setup_ver3_dfs_referral(char* pathname, char** ppdata,
reqpathlen = rpcstr_push(uni_reqpath, pathname, -1, STR_TERMINATE);
- dump_data(10,uni_reqpath,reqpathlen);
+ dump_data(10,(const char *)uni_reqpath,reqpathlen);
uni_reqpathoffset1 = REFERRAL_HEADER_SIZE + VERSION3_REFERRAL_SIZE * junction->referral_count;
uni_reqpathoffset2 = uni_reqpathoffset1 + reqpathlen;
diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c
index 51f0614941..13a3e86c6e 100644
--- a/source3/smbd/dfree.c
+++ b/source3/smbd/dfree.c
@@ -121,7 +121,7 @@ static SMB_BIG_UINT disk_free(const char *path, BOOL small_query,
} else
sys_fsusage(path, dfree, dsize);
- if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_q)) {
+ if (disk_quotas((char *)path, &bsize_q, &dfree_q, &dsize_q)) {
(*bsize) = bsize_q;
(*dfree) = MIN(*dfree,dfree_q);
(*dsize) = MIN(*dsize,dsize_q);
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c
index d68d052978..40e66061af 100644
--- a/source3/smbd/mangle.c
+++ b/source3/smbd/mangle.c
@@ -1568,7 +1568,6 @@ void mangle_name_83(char *s)
{
smb_ucs2_t *u2, *res;
size_t slen, u2len;
- BOOL ret = False;
DEBUG(10,("mangle_name_83: I'm so ugly, please remove me!\n"));
DEBUG(10,("mangle_name_83: testing -> [%s]\n", s));
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 097cb79e67..16d315f1d8 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -129,7 +129,7 @@ static int reply_lanman2(char *inbuf, char *outbuf)
generate_next_challenge(cryptkey);
} else {
memcpy(cryptkey, cli->secblob.data, 8);
- set_challenge(cryptkey);
+ set_challenge((unsigned char *)cryptkey);
}
}
@@ -171,8 +171,8 @@ static int negprot_spnego(char *p, uint8 cryptkey[8])
int len;
memset(guid, 0, 16);
- safe_strcpy(guid, global_myname, 16);
- strlower(guid);
+ safe_strcpy((char *)guid, global_myname, 16);
+ strlower((char *)guid);
/* win2000 uses host$@REALM, which we will probably use eventually,
but for now this works */
@@ -230,7 +230,7 @@ static int reply_nt1(char *inbuf, char *outbuf)
if (global_encrypted_passwords_negotiated) {
if (!cli) {
- generate_next_challenge(cryptkey);
+ generate_next_challenge((char *)cryptkey);
} else {
memcpy(cryptkey, cli->secblob.data, 8);
set_challenge(cryptkey);
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index fc6c694d9f..5412cc3bad 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -420,7 +420,7 @@ static int reply_sesssetup_and_X_spnego(connection_struct *conn, char *inbuf,cha
global_client_caps = IVAL(inbuf,smb_vwv10);
}
- p = smb_buf(inbuf);
+ p = (uint8 *)smb_buf(inbuf);
if (SVAL(inbuf, smb_vwv7) == 0) {
/* an anonymous request */