summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-02-23 16:22:43 -0800
committerJeremy Allison <jra@samba.org>2009-02-23 16:22:43 -0800
commitfaa1100d229aef56da5d48f5c19ec901e520f8ef (patch)
tree4f5bf875d05a91905ace8766c3d342770474eda9 /source3/lib
parentbcd6e5ec3315b14cedf7437a70c34d233ded082e (diff)
downloadsamba-faa1100d229aef56da5d48f5c19ec901e520f8ef.tar.gz
samba-faa1100d229aef56da5d48f5c19ec901e520f8ef.tar.bz2
samba-faa1100d229aef56da5d48f5c19ec901e520f8ef.zip
More warning fixes for Solaris.
Jeremy.
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/ldap_debug_handler.c4
-rw-r--r--source3/lib/smbldap.c2
-rw-r--r--source3/lib/system.c3
-rw-r--r--source3/lib/tdb_validate.c5
4 files changed, 7 insertions, 7 deletions
diff --git a/source3/lib/ldap_debug_handler.c b/source3/lib/ldap_debug_handler.c
index 2181ff014d..98623d1985 100644
--- a/source3/lib/ldap_debug_handler.c
+++ b/source3/lib/ldap_debug_handler.c
@@ -19,13 +19,11 @@
#include "includes.h"
-#if HAVE_LDAP
-
+#if defined(HAVE_LDAP) && defined(HAVE_LBER_LOG_PRINT_FN)
static void samba_ldap_log_print_fn(LDAP_CONST char *data)
{
DEBUG(lp_ldap_debug_threshold(), ("[LDAP] %s", data));
}
-
#endif
void init_ldap_debugging(void)
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index f0561a5081..e24d35818c 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -581,7 +581,9 @@ static void smbldap_store_state(LDAP *ld, struct smbldap_state *smbldap_state)
int smb_ldap_start_tls(LDAP *ldap_struct, int version)
{
+#ifdef LDAP_OPT_X_TLS
int rc;
+#endif
if (lp_ldap_ssl() != LDAP_SSL_START_TLS) {
return LDAP_SUCCESS;
diff --git a/source3/lib/system.c b/source3/lib/system.c
index ed66666ddb..8bdc9fa92b 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -2008,7 +2008,6 @@ static ssize_t solaris_read_xattr(int attrfd, void *value, size_t size)
static ssize_t solaris_list_xattr(int attrdirfd, char *list, size_t size)
{
ssize_t len = 0;
- int stop = 0;
DIR *dirp;
struct dirent *de;
int newfd = dup(attrdirfd);
@@ -2080,7 +2079,7 @@ static int solaris_openat(int fildes, const char *path, int oflag, mode_t mode)
{
int filedes = openat(fildes, path, oflag, mode);
if (filedes == -1) {
- DEBUG(10,("openat FAILED: fd: %s, path: %s, errno: %s\n",filedes,path,strerror(errno)));
+ DEBUG(10,("openat FAILED: fd: %d, path: %s, errno: %s\n",filedes,path,strerror(errno)));
if (errno == EINVAL) {
errno = ENOTSUP;
} else {
diff --git a/source3/lib/tdb_validate.c b/source3/lib/tdb_validate.c
index 1f5dfe4d25..092546e3eb 100644
--- a/source3/lib/tdb_validate.c
+++ b/source3/lib/tdb_validate.c
@@ -118,7 +118,8 @@ int tdb_validate(struct tdb_context *tdb, tdb_validate_data_func validate_fn)
/* parent */
- DEBUG(10, ("tdb_validate: fork succeeded, child PID = %d\n",child_pid));
+ DEBUG(10, ("tdb_validate: fork succeeded, child PID = %u\n",
+ (unsigned int)child_pid));
DEBUG(10, ("tdb_validate: waiting for child to finish...\n"));
while ((wait_pid = sys_waitpid(child_pid, &child_status, 0)) < 0) {
@@ -134,7 +135,7 @@ int tdb_validate(struct tdb_context *tdb, tdb_validate_data_func validate_fn)
}
if (wait_pid != child_pid) {
DEBUG(1, ("tdb_validate: waitpid returned pid %d, "
- "but %d was expected\n", wait_pid, child_pid));
+ "but %u was expected\n", wait_pid, (unsigned int)child_pid));
goto done;
}