diff options
author | Derrell Lipman <derrell@samba.org> | 2005-03-30 04:40:24 +0000 |
---|---|---|
committer | Derrell Lipman <derrell@samba.org> | 2005-03-30 04:40:24 +0000 |
commit | d09aed00c7b2c7bc703da2101e7f61cb72acf50f (patch) | |
tree | cef2400387129db212b0007bb30c797a4123a40f /source/nsswitch | |
parent | 1e67cf5c2a0dee0c18954a9db1ac67f1a978a425 (diff) | |
download | samba-d09aed00c7b2c7bc703da2101e7f61cb72acf50f.tar.gz samba-d09aed00c7b2c7bc703da2101e7f61cb72acf50f.tar.xz samba-d09aed00c7b2c7bc703da2101e7f61cb72acf50f.zip |
r6127: Eliminated all compiler warnings pertaining to mismatched "qualifiers". The
whole of samba comiles warning-free with the default compiler flags.
Temporarily defined -Wall to locate other potential problems. Found an
unused static function (#ifdefed out rather than deleted, in case it's
needed for something in progress).
There are also a number of uses of undeclared functions, mostly krb5_*.
Files with these problems need to have appropriate header files included,
but they are not fixed in this update.
oplock_linux.c.c has undefined functions capget() and capset(), which need
to have "#undef _POSIX_SOURCE" specified before including <sys/capability.h>,
but that could potentially have other side effects, so that remains uncorrected
as well.
The flag -Wall should be added permanently to CFLAGS, and all warnings then
generated should be eliminated.
Diffstat (limited to 'source/nsswitch')
-rw-r--r-- | source/nsswitch/winbindd_acct.c | 2 | ||||
-rw-r--r-- | source/nsswitch/winbindd_nss.h | 2 | ||||
-rw-r--r-- | source/nsswitch/winbindd_rpc.c | 3 | ||||
-rw-r--r-- | source/nsswitch/winbindd_util.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/source/nsswitch/winbindd_acct.c b/source/nsswitch/winbindd_acct.c index 2c8b7cae287..cd0b5b7e066 100644 --- a/source/nsswitch/winbindd_acct.c +++ b/source/nsswitch/winbindd_acct.c @@ -222,7 +222,7 @@ static WINBINDD_GR* string2group( char *string ) gr_members = SMB_XMALLOC_ARRAY(char*, num_gr_members+1); i = 0; - while ( next_token(&str, buffer, ",", sizeof(buffer)) && i<num_gr_members ) { + while ( next_token((const char **) &str, buffer, ",", sizeof(buffer)) && i<num_gr_members ) { gr_members[i++] = smb_xstrdup(buffer); } diff --git a/source/nsswitch/winbindd_nss.h b/source/nsswitch/winbindd_nss.h index 88e3254d24a..838ba1e211e 100644 --- a/source/nsswitch/winbindd_nss.h +++ b/source/nsswitch/winbindd_nss.h @@ -11,7 +11,7 @@ */ #ifndef SAFE_FREE -#define SAFE_FREE(x) do { if(x) {free(x); x=NULL;} } while(0) +#define SAFE_FREE(x) do { if(x) {free((void *) (x)); x=NULL;} } while(0) #endif #ifndef _WINBINDD_NTDOM_H diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index 99d12563c6c..5e974736e3d 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -788,7 +788,8 @@ static int get_ldap_seq(const char *server, int port, uint32 *seq) to.tv_sec = 10; to.tv_usec = 0; - if (ldap_search_st(ldp, "", LDAP_SCOPE_BASE, "(objectclass=*)", &attrs[0], 0, &to, &res)) + if (ldap_search_st(ldp, "", LDAP_SCOPE_BASE, "(objectclass=*)", + (char **) &attrs[0], 0, &to, &res)) goto done; if (ldap_count_entries(ldp, res) != 1) diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index 11da05ac3b4..3d03d6f4cc4 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -636,7 +636,7 @@ BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) */ void fill_domain_username(fstring name, const char *domain, const char *user) { - strlower_m( user ); + strlower_m( (char *) user ); if (assume_domain(domain)) { strlcpy(name, user, sizeof(fstring)); |