diff options
author | Jeremy Allison <jra@samba.org> | 2011-05-05 10:41:59 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-05-05 10:41:59 -0700 |
commit | 4f41be356a4e6b311d30de3b2e36e4c33aa72ca3 (patch) | |
tree | 91adb9035c762c36a6cb24f242c11408779bd3f7 /source3/lib | |
parent | 10a628b6e181af07f0c43db36ba017411b4eaaaa (diff) | |
download | samba-4f41be356a4e6b311d30de3b2e36e4c33aa72ca3.tar.gz samba-4f41be356a4e6b311d30de3b2e36e4c33aa72ca3.tar.bz2 samba-4f41be356a4e6b311d30de3b2e36e4c33aa72ca3.zip |
Fix many const compiler warnings.
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/tldap.c | 10 | ||||
-rw-r--r-- | source3/lib/util.c | 4 | ||||
-rw-r--r-- | source3/lib/winbind_util.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c index ba27028649..3afdaea419 100644 --- a/source3/lib/tldap.c +++ b/source3/lib/tldap.c @@ -189,7 +189,7 @@ bool tldap_context_setattr(struct tldap_context *ld, struct tldap_ctx_attribute *tmp, *attr; char *tmpname; int num_attrs; - void **pptr = (void **)_pptr; + void **pptr = (void **)discard_const_p(void,_pptr); attr = tldap_context_findattr(ld, name); if (attr != NULL) { @@ -935,10 +935,10 @@ struct tevent_req *tldap_simple_bind_send(TALLOC_CTX *mem_ctx, DATA_BLOB cred; if (passwd != NULL) { - cred.data = (uint8_t *)passwd; + cred.data = discard_const_p(uint8_t, passwd); cred.length = strlen(passwd); } else { - cred.data = (uint8_t *)""; + cred.data = discard_const_p(uint8_t, ""); cred.length = 0; } return tldap_sasl_bind_send(mem_ctx, ev, ld, dn, NULL, &cred, NULL, 0, @@ -956,10 +956,10 @@ int tldap_simple_bind(struct tldap_context *ld, const char *dn, DATA_BLOB cred; if (passwd != NULL) { - cred.data = (uint8_t *)passwd; + cred.data = discard_const_p(uint8_t, passwd); cred.length = strlen(passwd); } else { - cred.data = (uint8_t *)""; + cred.data = discard_const_p(uint8_t, ""); cred.length = 0; } return tldap_sasl_bind(ld, dn, NULL, &cred, NULL, 0, NULL, 0); diff --git a/source3/lib/util.c b/source3/lib/util.c index 718500a684..cd856ee355 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -298,7 +298,7 @@ SMB_OFF_T get_file_size(char *file_name) Show a smb message structure. ********************************************************************/ -void show_msg(char *buf) +void show_msg(const char *buf) { int i; int bcc=0; @@ -335,7 +335,7 @@ void show_msg(char *buf) if (DEBUGLEVEL < 50) bcc = MIN(bcc, 512); - dump_data(10, (uint8 *)smb_buf(buf), bcc); + dump_data(10, (const uint8 *)smb_buf(buf), bcc); } /******************************************************************* diff --git a/source3/lib/winbind_util.c b/source3/lib/winbind_util.c index f30bcfc612..3fa1485d45 100644 --- a/source3/lib/winbind_util.c +++ b/source3/lib/winbind_util.c @@ -245,7 +245,7 @@ bool winbind_lookup_rids(TALLOC_CTX *mem_ctx, (*types)[i] = (enum lsa_SidType)name_types[i]; } - wbcFreeMemory(CONST_DISCARD(char*, dom_name)); + wbcFreeMemory(discard_const_p(char, dom_name)); wbcFreeMemory(namelist); wbcFreeMemory(name_types); |