diff options
author | Rich Megginson <rmeggins@redhat.com> | 2009-05-19 13:17:11 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2009-05-19 14:05:25 -0600 |
commit | f9db3ac14855eb07e49f2f5797cbb7d338bb614b (patch) | |
tree | 4bc8d8283ba975ed2decaa664615548081866679 /ldap/servers/slapd/util.c | |
parent | 47a59378cbf4b48eef492530ebc1c8ea6059a757 (diff) | |
download | ds-f9db3ac14855eb07e49f2f5797cbb7d338bb614b.tar.gz ds-f9db3ac14855eb07e49f2f5797cbb7d338bb614b.tar.xz ds-f9db3ac14855eb07e49f2f5797cbb7d338bb614b.zip |
Fix various compiler warnings
1) Make sure we use "const" consistently
2) Make sure we use "unsigned char" consistently
for some reason (unsigned char)*p did not compare to '\xHH' literals unless the literal was also cast to (unsigned char)
3) added some missing function prototypes
4) removed some unused variables/functions, or commented out for use when debugging
5) various other compiler warnings
With all of these, the code compiles cleanly on RHEL5 x86_64 using
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
and
CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic"
The only warning now is the spurious message about %llu or %lld having the wrong format argument.
Reviewed by: nhosoi (Thanks!)
Diffstat (limited to 'ldap/servers/slapd/util.c')
-rw-r--r-- | ldap/servers/slapd/util.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c index 2aff1e30..672eff1d 100644 --- a/ldap/servers/slapd/util.c +++ b/ldap/servers/slapd/util.c @@ -887,35 +887,6 @@ slapi_urlparse_err2string( int err ) #include <sasl.h> -/* copied from mozldap libldap/saslbind.c */ -static int -slapd_sasl_fail() -{ - return( SASL_FAIL ); -} - -/* copied from slapd/saslbind.c - not an easy way to share this function - between the two files */ -static int slapd_sasl_getpluginpath(sasl_conn_t *conn, const char **path) -{ - /* Try to get path from config, otherwise check for SASL_PATH environment - * variable. If neither of these are set, default to /usr/lib64/sasl2 on - * 64-bit Linux machines, and /usr/lib/sasl2 on all other platforms. - */ - char *pluginpath = config_get_saslpath(); - if ((!pluginpath) || (*pluginpath == '\0')) { - if (!(pluginpath = getenv("SASL_PATH"))) { -#if defined(LINUX) && defined(__LP64__) - pluginpath = "/usr/lib64/sasl2"; -#else - pluginpath = "/usr/lib/sasl2"; -#endif - } - } - *path = pluginpath; - return SASL_OK; -} - /* Perform LDAP init and return an LDAP* handle. If ldapurl is given, that is used as the basis for the protocol, host, port, and whether |