From 3ea349271355b39f7b877ce67530cc58e7db0ee8 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 23 Oct 2001 19:10:30 +0000 Subject: get rid of compiler warnings (casts and delete unused variables) (This used to be commit 51cb4411df61d1caec9d84809b1a53a6a632f808) --- source3/intl/lang_tdb.c | 4 ++-- source3/lib/charcnv.c | 12 +++++------- source3/lib/iconv.c | 4 ++-- source3/msdfs/msdfs.c | 4 ++-- source3/smbd/dfree.c | 2 +- source3/smbd/mangle.c | 1 - source3/smbd/negprot.c | 8 ++++---- source3/smbd/sesssetup.c | 2 +- 8 files changed, 17 insertions(+), 20 deletions(-) (limited to 'source3') 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;c1direct) { 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 */ -- cgit