More warning fixes for Solaris.
authorJeremy Allison <jra@samba.org>
Tue, 24 Feb 2009 00:23:42 +0000 (16:23 -0800)
committerJeremy Allison <jra@samba.org>
Tue, 24 Feb 2009 00:23:42 +0000 (16:23 -0800)
Jeremy.

20 files changed:
source/client/client.c
source/include/proto.h
source/lib/ldap_debug_handler.c
source/lib/replace/getifaddrs.c
source/lib/smbldap.c
source/lib/system.c
source/lib/util_file.c
source/lib/util_tdb.c
source/libsmb/libsmb_dir.c
source/modules/vfs_extd_audit.c
source/nmbd/nmbd.c
source/smbd/connection.c
source/smbd/open.c
source/smbd/posix_acls.c
source/smbd/server.c
source/smbd/sesssetup.c
source/utils/smbget.c
source/winbindd/winbindd.c
source/winbindd/winbindd_cache.c
source/winbindd/winbindd_dual.c

index df92bae26f89c031a121c1bf168191d0bf1fb20d..53bd9e6f9aa814f0b782effbf62604a0e07ebdcf 100644 (file)
@@ -1785,13 +1785,13 @@ static struct file_list {
  Free a file_list structure.
 ****************************************************************************/
 
-static void free_file_list (struct file_list *list_head)
+static void free_file_list (struct file_list *l_head)
 {
        struct file_list *list, *next;
 
-       for (list = list_head; list; list = next) {
+       for (list = l_head; list; list = next) {
                next = list->next;
-               DLIST_REMOVE(list_head, list);
+               DLIST_REMOVE(l_head, list);
                SAFE_FREE(list->file_path);
                SAFE_FREE(list);
        }
index 981a0ee07b8a5d13c6b6a06aecb3ff2425a6fc9e..72d3ffe8f49927d3fccbf9b107efbc21d1b918af 100644 (file)
@@ -1374,7 +1374,7 @@ bool unmap_file(void* start, size_t size);
 void *map_file(char *fname, size_t size);
 char **file_lines_load(const char *fname, int *numlines, size_t maxsize);
 char **fd_lines_load(int fd, int *numlines, size_t maxsize);
-char **file_lines_pload(char *syscmd, int *numlines);
+char **file_lines_pload(const char *syscmd, int *numlines);
 void file_lines_free(char **lines);
 void file_lines_slashcont(char **lines);
 bool file_save(const char *fname, void *packet, size_t length);
index 2181ff014d26777d26a01e8ddb2b7f29e5cc91c0..98623d1985c8b70e69cdf235f9ae4854c27473ac 100644 (file)
 
 #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)
index f6f0ec080c2e48ef085635c04c6af7d87c61753d..3a91bb40d2ac44c87b8ff1885d8ca0be22b23f5b 100644 (file)
@@ -84,9 +84,6 @@ int rep_getifaddrs(struct ifaddrs **ifap)
        char buff[8192];
        int fd, i, n;
        struct ifreq *ifr=NULL;
-       struct in_addr ipaddr;
-       struct in_addr nmask;
-       char *iname;
        struct ifaddrs *curif;
        struct ifaddrs *lastif = NULL;
 
@@ -164,9 +161,6 @@ int rep_getifaddrs(struct ifaddrs **ifap)
        char buff[8192];
        int fd, i, n;
        struct ifreq *ifr=NULL;
-       struct in_addr ipaddr;
-       struct in_addr nmask;
-       char *iname;
        struct ifaddrs *curif;
        struct ifaddrs *lastif = NULL;
 
@@ -265,9 +259,6 @@ int rep_getifaddrs(struct ifaddrs **ifap)
        int fd, i;
        struct ifconf ifc;
        struct ifreq *ifr=NULL;
-       struct in_addr ipaddr;
-       struct in_addr nmask;
-       char *iname;
        struct ifaddrs *curif;
        struct ifaddrs *lastif = NULL;
 
index 8e7ecdfcb04f551506b6025faca5c5ffad817acc..7e9f1ac9158af5e7d6265a648f26fcfc4371b9c0 100644 (file)
@@ -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;
index 48ecf903d94d65462b2b7d1587a007b64c421931..36745b112f0b21f3039f9a98471ad4f00de4dff4 100644 (file)
@@ -2171,7 +2171,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);
@@ -2243,7 +2242,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 {
index b628b06cc6aafd37f89ed4dbbc3b86a697a7e9eb..f9ffa44b03b759e9e3870d93454c68e3237ad732 100644 (file)
@@ -101,7 +101,7 @@ char *fgets_slash(char *s2,int maxlen,XFILE *f)
  Load from a pipe into memory.
 ****************************************************************************/
 
-static char *file_pload(char *syscmd, size_t *size)
+static char *file_pload(const char *syscmd, size_t *size)
 {
        int fd, n;
        char *p;
@@ -351,7 +351,7 @@ char **fd_lines_load(int fd, int *numlines, size_t maxsize)
  must be freed with file_lines_free(). 
 ****************************************************************************/
 
-char **file_lines_pload(char *syscmd, int *numlines)
+char **file_lines_pload(const char *syscmd, int *numlines)
 {
        char *p;
        size_t size;
index 6d61fd9f719320d66ecf4be3edbf0c7b0bc11603..e8f6c67d08ce396f791e60b12acadb8ea594d1b5 100644 (file)
@@ -1097,7 +1097,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) {
@@ -1113,7 +1114,8 @@ 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;
        }
 
index 610cfcd3cf4346a024807a9cf6c41ce1b740a04d..89782ce2a1dcb7d17114c63eef1ce8c91fa40ca7 100644 (file)
@@ -1520,7 +1520,7 @@ SMBC_chmod_ctx(SMBCCTX *context,
                return -1;
        }
 
-       DEBUG(4, ("smbc_chmod(%s, 0%3o)\n", fname, newmode));
+       DEBUG(4, ("smbc_chmod(%s, 0%3o)\n", fname, (unsigned int)newmode));
 
        if (SMBC_parse_path(frame,
                             context,
index 7516cba1d3f81e4eafce10cbe63f3b36eb6a6052..d5449884f415323cdf4ca2e54993b09685d65e82 100644 (file)
@@ -289,7 +289,7 @@ static int audit_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : "");
        DEBUG(1, ("vfs_extd_audit: chmod %s mode 0x%x %s %s\n",
-              path, mode,
+              path, (unsigned int)mode,
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : ""));
 
@@ -307,7 +307,7 @@ static int audit_chmod_acl(vfs_handle_struct *handle, const char *path, mode_t m
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : "");
        DEBUG(1, ("vfs_extd_audit: chmod_acl %s mode 0x%x %s %s\n",
-               path, mode,
+               path, (unsigned int)mode,
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : ""));
 
@@ -325,7 +325,7 @@ static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mod
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : "");
        DEBUG(1, ("vfs_extd_audit: fchmod %s mode 0x%x %s %s",
-              fsp->fsp_name,  mode,
+              fsp->fsp_name,  (unsigned int)mode,
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : ""));
 
@@ -343,7 +343,7 @@ static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : "");
        DEBUG(1, ("vfs_extd_audit: fchmod_acl %s mode 0x%x %s %s",
-              fsp->fsp_name,  mode,
+              fsp->fsp_name,  (unsigned int)mode,
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : ""));
 
index 7ea2bd0adb08b07c9b387ff23eae9d5e21206f8d..7786bef948768ec543199220b7d98d60eab1d045 100644 (file)
@@ -381,18 +381,18 @@ static void msg_nmbd_send_packet(struct messaging_context *msg,
        const struct sockaddr_storage *pss;
        const struct in_addr *local_ip;
 
-       DEBUG(10, ("Received send_packet from %d\n", procid_to_pid(&src)));
+       DEBUG(10, ("Received send_packet from %u\n", (unsigned int)procid_to_pid(&src)));
 
        if (data->length != sizeof(struct packet_struct)) {
-               DEBUG(2, ("Discarding invalid packet length from %d\n",
-                         procid_to_pid(&src)));
+               DEBUG(2, ("Discarding invalid packet length from %u\n",
+                         (unsigned int)procid_to_pid(&src)));
                return;
        }
 
        if ((p->packet_type != NMB_PACKET) &&
            (p->packet_type != DGRAM_PACKET)) {
-               DEBUG(2, ("Discarding invalid packet type from %d: %d\n",
-                         procid_to_pid(&src), p->packet_type));
+               DEBUG(2, ("Discarding invalid packet type from %u: %d\n",
+                         (unsigned int)procid_to_pid(&src), p->packet_type));
                return;
        }
 
@@ -400,8 +400,8 @@ static void msg_nmbd_send_packet(struct messaging_context *msg,
        pss = iface_ip(&ss);
 
        if (pss == NULL) {
-               DEBUG(2, ("Could not find ip for packet from %d\n",
-                         procid_to_pid(&src)));
+               DEBUG(2, ("Could not find ip for packet from %u\n",
+                         (unsigned int)procid_to_pid(&src)));
                return;
        }
 
index fd83f777253d97f1025cba0eb0c13aa6da422ed4..74b25b6644b2c0043688a07c8ebe5270bfb29b9e 100644 (file)
@@ -241,7 +241,7 @@ static TDB_DATA* make_pipe_rec_key( struct pipe_open_rec *prec )
        }
 
        snprintf( key_string, sizeof(key_string), "%s/%d/%d",
-               prec->name, procid_to_pid(&prec->pid), prec->pnum );
+               prec->name, (int)procid_to_pid(&prec->pid), prec->pnum );
 
        *kbuf = string_term_tdb_data(talloc_strdup(prec, key_string));
        if (kbuf->dptr == NULL )
index bbf1b40c2f8a0b067eef9096662f2143062e1970..31679b539dd2bf3dec52e59916cce05305de3e91 100644 (file)
@@ -1412,7 +1412,7 @@ static NTSTATUS open_file_ntcreate_internal(connection_struct *conn,
                   "create_disposition = 0x%x create_options=0x%x "
                   "unix mode=0%o oplock_request=%d\n",
                   fname, new_dos_attributes, access_mask, share_access,
-                  create_disposition, create_options, unx_mode,
+                  create_disposition, create_options, (unsigned int)unx_mode,
                   oplock_request));
 
        if ((req == NULL) && ((oplock_request & INTERNAL_OPEN_ONLY) == 0)) {
index 00f7f1c37d702b3eac7b591aa9c0b13fcd6d1bb9..16acca4f9a303b2d358b9f69b5ce64b82ad91e64 100644 (file)
@@ -563,12 +563,12 @@ static struct pai_val *load_inherited_info(const struct connection_struct *conn,
  Count a linked list of canonical ACE entries.
 ****************************************************************************/
 
-static size_t count_canon_ace_list( canon_ace *list_head )
+static size_t count_canon_ace_list( canon_ace *l_head )
 {
        size_t count = 0;
        canon_ace *ace;
 
-       for (ace = list_head; ace; ace = ace->next)
+       for (ace = l_head; ace; ace = ace->next)
                count++;
 
        return count;
@@ -578,13 +578,13 @@ static size_t count_canon_ace_list( canon_ace *list_head )
  Free a linked list of canonical ACE entries.
 ****************************************************************************/
 
-static void free_canon_ace_list( canon_ace *list_head )
+static void free_canon_ace_list( canon_ace *l_head )
 {
        canon_ace *list, *next;
 
-       for (list = list_head; list; list = next) {
+       for (list = l_head; list; list = next) {
                next = list->next;
-               DLIST_REMOVE(list_head, list);
+               DLIST_REMOVE(l_head, list);
                SAFE_FREE(list);
        }
 }
@@ -760,7 +760,7 @@ static bool identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2)
 
 static void merge_aces( canon_ace **pp_list_head )
 {
-       canon_ace *list_head = *pp_list_head;
+       canon_ace *l_head = *pp_list_head;
        canon_ace *curr_ace_outer;
        canon_ace *curr_ace_outer_next;
 
@@ -769,7 +769,7 @@ static void merge_aces( canon_ace **pp_list_head )
         * with identical SIDs.
         */
 
-       for (curr_ace_outer = list_head; curr_ace_outer; curr_ace_outer = curr_ace_outer_next) {
+       for (curr_ace_outer = l_head; curr_ace_outer; curr_ace_outer = curr_ace_outer_next) {
                canon_ace *curr_ace;
                canon_ace *curr_ace_next;
 
@@ -791,7 +791,7 @@ static void merge_aces( canon_ace **pp_list_head )
                                /* Merge two allow or two deny ACE's. */
 
                                curr_ace_outer->perms |= curr_ace->perms;
-                               DLIST_REMOVE(list_head, curr_ace);
+                               DLIST_REMOVE(l_head, curr_ace);
                                SAFE_FREE(curr_ace);
                                curr_ace_outer_next = curr_ace_outer->next; /* We may have deleted the link. */
                        }
@@ -804,7 +804,7 @@ static void merge_aces( canon_ace **pp_list_head )
         * appears only once in the list.
         */
 
-       for (curr_ace_outer = list_head; curr_ace_outer; curr_ace_outer = curr_ace_outer_next) {
+       for (curr_ace_outer = l_head; curr_ace_outer; curr_ace_outer = curr_ace_outer_next) {
                canon_ace *curr_ace;
                canon_ace *curr_ace_next;
 
@@ -836,7 +836,7 @@ static void merge_aces( canon_ace **pp_list_head )
                                         * The deny overrides the allow. Remove the allow.
                                         */
 
-                                       DLIST_REMOVE(list_head, curr_ace);
+                                       DLIST_REMOVE(l_head, curr_ace);
                                        SAFE_FREE(curr_ace);
                                        curr_ace_outer_next = curr_ace_outer->next; /* We may have deleted the link. */
 
@@ -852,7 +852,7 @@ static void merge_aces( canon_ace **pp_list_head )
                                         * before we can get to an allow ace.
                                         */
 
-                                       DLIST_REMOVE(list_head, curr_ace_outer);
+                                       DLIST_REMOVE(l_head, curr_ace_outer);
                                        SAFE_FREE(curr_ace_outer);
                                        break;
                                }
@@ -863,7 +863,7 @@ static void merge_aces( canon_ace **pp_list_head )
 
        /* We may have modified the list. */
 
-       *pp_list_head = list_head;
+       *pp_list_head = l_head;
 }
 
 /****************************************************************************
@@ -2147,12 +2147,12 @@ static bool unpack_canon_ace(files_struct *fsp,
 
 static void arrange_posix_perms(const char *filename, canon_ace **pp_list_head)
 {
-       canon_ace *list_head = *pp_list_head;
+       canon_ace *l_head = *pp_list_head;
        canon_ace *owner_ace = NULL;
        canon_ace *other_ace = NULL;
        canon_ace *ace = NULL;
 
-       for (ace = list_head; ace; ace = ace->next) {
+       for (ace = l_head; ace; ace = ace->next) {
                if (ace->type == SMB_ACL_USER_OBJ)
                        owner_ace = ace;
                else if (ace->type == SMB_ACL_OTHER) {
@@ -2173,16 +2173,16 @@ static void arrange_posix_perms(const char *filename, canon_ace **pp_list_head)
         */
 
        if (owner_ace) {
-               DLIST_PROMOTE(list_head, owner_ace);
+               DLIST_PROMOTE(l_head, owner_ace);
        }
 
        if (other_ace) {
-               DLIST_DEMOTE(list_head, other_ace, canon_ace *);
+               DLIST_DEMOTE(l_head, other_ace, canon_ace *);
        }
 
        /* We have probably changed the head of the list. */
 
-       *pp_list_head = list_head;
+       *pp_list_head = l_head;
 }
                
 /****************************************************************************
@@ -2195,7 +2195,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
                                   const DOM_SID *powner, const DOM_SID *pgroup, struct pai_val *pal, SMB_ACL_TYPE_T the_acl_type)
 {
        mode_t acl_mask = (S_IRUSR|S_IWUSR|S_IXUSR);
-       canon_ace *list_head = NULL;
+       canon_ace *l_head = NULL;
        canon_ace *ace = NULL;
        canon_ace *next_ace = NULL;
        int entry_id = SMB_ACL_FIRST_ENTRY;
@@ -2299,14 +2299,14 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
                ace->owner_type = owner_type;
                ace->inherited = get_inherited_flag(pal, ace, (the_acl_type == SMB_ACL_TYPE_DEFAULT));
 
-               DLIST_ADD(list_head, ace);
+               DLIST_ADD(l_head, ace);
        }
 
        /*
         * This next call will ensure we have at least a user/group/world set.
         */
 
-       if (!ensure_canon_entry_valid(&list_head, conn->params,
+       if (!ensure_canon_entry_valid(&l_head, conn->params,
                                      S_ISDIR(psbuf->st_mode), powner, pgroup,
                                      psbuf, False))
                goto fail;
@@ -2318,7 +2318,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
 
        DEBUG(10,("canonicalise_acl: %s ace entries before arrange :\n", the_acl_type == SMB_ACL_TYPE_ACCESS ? "Access" : "Default" ));
 
-       for ( ace_count = 0, ace = list_head; ace; ace = next_ace, ace_count++) {
+       for ( ace_count = 0, ace = l_head; ace; ace = next_ace, ace_count++) {
                next_ace = ace->next;
 
                /* Masks are only applied to entries other than USER_OBJ and OTHER. */
@@ -2326,7 +2326,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
                        ace->perms &= acl_mask;
 
                if (ace->perms == 0) {
-                       DLIST_PROMOTE(list_head, ace);
+                       DLIST_PROMOTE(l_head, ace);
                }
 
                if( DEBUGLVL( 10 ) ) {
@@ -2334,15 +2334,15 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
                }
        }
 
-       arrange_posix_perms(fname,&list_head );
+       arrange_posix_perms(fname,&l_head );
 
-       print_canon_ace_list( "canonicalise_acl: ace entries after arrange", list_head );
+       print_canon_ace_list( "canonicalise_acl: ace entries after arrange", l_head );
 
-       return list_head;
+       return l_head;
 
   fail:
 
-       free_canon_ace_list(list_head);
+       free_canon_ace_list(l_head);
        return NULL;
 }
 
index 6edef00b11aead8610197c84ba156b5e04b17793..00a2cd4c756d5a20e68660001599a83ff6fe3561 100644 (file)
@@ -299,7 +299,7 @@ static void remove_child_pid(pid_t pid, bool unclean_shutdown)
                /* a child terminated uncleanly so tickle all processes to see 
                   if they can grab any of the pending locks
                */
-               DEBUG(3,(__location__ " Unclean shutdown of pid %u\n", pid));
+               DEBUG(3,(__location__ " Unclean shutdown of pid %u\n", (unsigned int)pid));
                messaging_send_buf(smbd_messaging_context(), procid_self(), 
                                   MSG_SMB_BRL_VALIDATE, NULL, 0);
                message_send_all(smbd_messaging_context(), 
index 2221574299af5dae7b36ece04be1f204368ebc4b..6d7eb6fae2a701795510208ae4c683dea2243849 100644 (file)
@@ -1352,8 +1352,8 @@ static int shutdown_other_smbds(struct db_record *rec,
                return 0;
        }
 
-       DEBUG(0,("shutdown_other_smbds: shutting down pid %d "
-                "(IP %s)\n", procid_to_pid(&crec->pid), ip));
+       DEBUG(0,("shutdown_other_smbds: shutting down pid %u "
+                "(IP %s)\n", (unsigned int)procid_to_pid(&crec->pid), ip));
 
        messaging_send(smbd_messaging_context(), crec->pid, MSG_SHUTDOWN,
                       &data_blob_null);
index 7c01f5db3a0ea1c32a89d8c68bbca307552ff972..042f3a98f712b2fab26770b60059d9802f2971d2 100644 (file)
@@ -194,7 +194,8 @@ static int smb_download_dir(const char *base, const char *name, int resume)
                }
                
                if(chmod(relname, remotestat.st_mode) < 0) {
-                       fprintf(stderr, "Unable to change mode of local dir %s to %o\n", relname, remotestat.st_mode);
+                       fprintf(stderr, "Unable to change mode of local dir %s to %o\n", relname,
+                               (unsigned int)remotestat.st_mode);
                        smbc_closedir(dirhandle);
                        return 0;
                }
@@ -471,7 +472,8 @@ static int smb_download_file(const char *base, const char *name, int recursive,
 
        if(keep_permissions && !send_stdout) {
                if(fchmod(localhandle, remotestat.st_mode) < 0) {
-                       fprintf(stderr, "Unable to change mode of local file %s to %o\n", path, remotestat.st_mode);
+                       fprintf(stderr, "Unable to change mode of local file %s to %o\n", path,
+                               (unsigned int)remotestat.st_mode);
                        smbc_close(remotehandle);
                        close(localhandle);
                        return 0;
index e235c9653493a10b1c0e9da1c45f1369c56cae59..a914c5c9a93c554be815893a8f5f3491146e40d1 100644 (file)
@@ -259,7 +259,7 @@ static void winbind_msg_validate_cache(struct messaging_context *msg_ctx,
        if (child_pid != 0) {
                /* parent */
                DEBUG(5, ("winbind_msg_validate_cache: child created with "
-                         "pid %d.\n", child_pid));
+                         "pid %d.\n", (int)child_pid));
                return;
        }
 
index 863852e83742df97eca37891897bd6f92f3f5cc6..7688ff46b9c0ddae85e29540420772e7043c5148 100644 (file)
@@ -2624,9 +2624,9 @@ void cache_store_response(pid_t pid, struct winbindd_response *response)
                return;
 
        DEBUG(10, ("Storing response for pid %d, len %d\n",
-                  pid, response->length));
+                  (int)pid, response->length));
 
-       fstr_sprintf(key_str, "DR/%d", pid);
+       fstr_sprintf(key_str, "DR/%d", (int)pid);
        if (tdb_store(wcache->tdb, string_tdb_data(key_str), 
                      make_tdb_data((uint8 *)response, sizeof(*response)),
                      TDB_REPLACE) == -1)
@@ -2640,7 +2640,7 @@ void cache_store_response(pid_t pid, struct winbindd_response *response)
        DEBUG(10, ("Storing extra data: len=%d\n",
                   (int)(response->length - sizeof(*response))));
 
-       fstr_sprintf(key_str, "DE/%d", pid);
+       fstr_sprintf(key_str, "DE/%d", (int)pid);
        if (tdb_store(wcache->tdb, string_tdb_data(key_str),
                      make_tdb_data((uint8 *)response->extra_data.data,
                                    response->length - sizeof(*response)),
@@ -2650,7 +2650,7 @@ void cache_store_response(pid_t pid, struct winbindd_response *response)
        /* We could not store the extra data, make sure the tdb does not
         * contain a main record with wrong dangling extra data */
 
-       fstr_sprintf(key_str, "DR/%d", pid);
+       fstr_sprintf(key_str, "DR/%d", (int)pid);
        tdb_delete(wcache->tdb, string_tdb_data(key_str));
 
        return;
@@ -2664,9 +2664,9 @@ bool cache_retrieve_response(pid_t pid, struct winbindd_response * response)
        if (!init_wcache())
                return false;
 
-       DEBUG(10, ("Retrieving response for pid %d\n", pid));
+       DEBUG(10, ("Retrieving response for pid %d\n", (int)pid));
 
-       fstr_sprintf(key_str, "DR/%d", pid);
+       fstr_sprintf(key_str, "DR/%d", (int)pid);
        data = tdb_fetch(wcache->tdb, string_tdb_data(key_str));
 
        if (data.dptr == NULL)
@@ -2688,7 +2688,7 @@ bool cache_retrieve_response(pid_t pid, struct winbindd_response * response)
        DEBUG(10, ("Retrieving extra data length=%d\n",
                   (int)(response->length - sizeof(*response))));
 
-       fstr_sprintf(key_str, "DE/%d", pid);
+       fstr_sprintf(key_str, "DE/%d", (int)pid);
        data = tdb_fetch(wcache->tdb, string_tdb_data(key_str));
 
        if (data.dptr == NULL) {
@@ -2715,10 +2715,10 @@ void cache_cleanup_response(pid_t pid)
        if (!init_wcache())
                return;
 
-       fstr_sprintf(key_str, "DR/%d", pid);
+       fstr_sprintf(key_str, "DR/%d", (int)pid);
        tdb_delete(wcache->tdb, string_tdb_data(key_str));
 
-       fstr_sprintf(key_str, "DE/%d", pid);
+       fstr_sprintf(key_str, "DE/%d", (int)pid);
        tdb_delete(wcache->tdb, string_tdb_data(key_str));
 
        return;
index 61585b668a171ccd2a32c60bdb9b8c9c3f163c06..ff004f293ced602ec965f1f7aa384eb2c98aabd6 100644 (file)
@@ -183,7 +183,7 @@ static void async_request_timeout_handler(struct event_context *ctx,
 
        DEBUG(0,("async_request_timeout_handler: child pid %u is not responding. "
                "Closing connection to it.\n",
-               state->child_pid ));
+               (unsigned int)state->child_pid ));
 
        /* Deal with the reply - set to error. */
        async_reply_recv(private_data, False);