summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2001-10-23 19:10:30 +0000
committerHerb Lewis <herb@samba.org>2001-10-23 19:10:30 +0000
commit3ea349271355b39f7b877ce67530cc58e7db0ee8 (patch)
tree3e5c5c112cb3aa8386b3e08bbdd444953a6ebd52 /source3/lib
parent2a2cccabca40af0d713a4541b4ccba0a3d97496c (diff)
downloadsamba-3ea349271355b39f7b877ce67530cc58e7db0ee8.tar.gz
samba-3ea349271355b39f7b877ce67530cc58e7db0ee8.tar.bz2
samba-3ea349271355b39f7b877ce67530cc58e7db0ee8.zip
get rid of compiler warnings (casts and delete unused variables)
(This used to be commit 51cb4411df61d1caec9d84809b1a53a6a632f808)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/charcnv.c12
-rw-r--r--source3/lib/iconv.c4
2 files changed, 7 insertions, 9 deletions
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;