From f0e36527de04d2796097ebd29fba2a25fc2e1c38 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 23 Feb 2009 16:23:42 -0800 Subject: [PATCH] More warning fixes for Solaris. Jeremy. (cherry picked from commit aea38950ff4865f1d791cd19619fadcd59eaf480) --- source/client/client.c | 6 ++--- source/include/proto.h | 2 +- source/lib/ldap_debug_handler.c | 4 +--- source/lib/replace/getifaddrs.c | 9 ------- source/lib/smbldap.c | 2 ++ source/lib/system.c | 3 +-- source/lib/util_file.c | 4 ++-- source/lib/util_tdb.c | 6 +++-- source/libsmb/libsmb_dir.c | 2 +- source/modules/vfs_extd_audit.c | 8 +++---- source/nmbd/nmbd.c | 14 +++++------ source/smbd/connection.c | 2 +- source/smbd/open.c | 2 +- source/smbd/posix_acls.c | 52 ++++++++++++++++++++-------------------- source/smbd/server.c | 2 +- source/smbd/sesssetup.c | 4 ++-- source/utils/smbget.c | 6 +++-- source/winbindd/winbindd.c | 2 +- source/winbindd/winbindd_cache.c | 18 +++++++------- source/winbindd/winbindd_dual.c | 2 +- 20 files changed, 72 insertions(+), 78 deletions(-) diff --git a/source/client/client.c b/source/client/client.c index df92bae26f8..53bd9e6f9aa 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -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); } diff --git a/source/include/proto.h b/source/include/proto.h index 981a0ee07b8..72d3ffe8f49 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -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); diff --git a/source/lib/ldap_debug_handler.c b/source/lib/ldap_debug_handler.c index 2181ff014d2..98623d1985c 100644 --- a/source/lib/ldap_debug_handler.c +++ b/source/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/source/lib/replace/getifaddrs.c b/source/lib/replace/getifaddrs.c index f6f0ec080c2..3a91bb40d2a 100644 --- a/source/lib/replace/getifaddrs.c +++ b/source/lib/replace/getifaddrs.c @@ -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; diff --git a/source/lib/smbldap.c b/source/lib/smbldap.c index 8e7ecdfcb04..7e9f1ac9158 100644 --- a/source/lib/smbldap.c +++ b/source/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/source/lib/system.c b/source/lib/system.c index 48ecf903d94..36745b112f0 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -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 { diff --git a/source/lib/util_file.c b/source/lib/util_file.c index b628b06cc6a..f9ffa44b03b 100644 --- a/source/lib/util_file.c +++ b/source/lib/util_file.c @@ -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; diff --git a/source/lib/util_tdb.c b/source/lib/util_tdb.c index 6d61fd9f719..e8f6c67d08c 100644 --- a/source/lib/util_tdb.c +++ b/source/lib/util_tdb.c @@ -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; } diff --git a/source/libsmb/libsmb_dir.c b/source/libsmb/libsmb_dir.c index 610cfcd3cf4..89782ce2a1d 100644 --- a/source/libsmb/libsmb_dir.c +++ b/source/libsmb/libsmb_dir.c @@ -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, diff --git a/source/modules/vfs_extd_audit.c b/source/modules/vfs_extd_audit.c index 7516cba1d3f..d5449884f41 100644 --- a/source/modules/vfs_extd_audit.c +++ b/source/modules/vfs_extd_audit.c @@ -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) : "")); diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 7ea2bd0adb0..7786bef9487 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -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; } diff --git a/source/smbd/connection.c b/source/smbd/connection.c index fd83f777253..74b25b6644b 100644 --- a/source/smbd/connection.c +++ b/source/smbd/connection.c @@ -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 ) diff --git a/source/smbd/open.c b/source/smbd/open.c index bbf1b40c2f8..31679b539dd 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -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)) { diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 00f7f1c37d7..16acca4f9a3 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -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; } diff --git a/source/smbd/server.c b/source/smbd/server.c index 6edef00b11a..00a2cd4c756 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -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(), diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c index 2221574299a..6d7eb6fae2a 100644 --- a/source/smbd/sesssetup.c +++ b/source/smbd/sesssetup.c @@ -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); diff --git a/source/utils/smbget.c b/source/utils/smbget.c index 7c01f5db3a0..042f3a98f71 100644 --- a/source/utils/smbget.c +++ b/source/utils/smbget.c @@ -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; diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c index e235c965349..a914c5c9a93 100644 --- a/source/winbindd/winbindd.c +++ b/source/winbindd/winbindd.c @@ -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; } diff --git a/source/winbindd/winbindd_cache.c b/source/winbindd/winbindd_cache.c index 863852e8374..7688ff46b9c 100644 --- a/source/winbindd/winbindd_cache.c +++ b/source/winbindd/winbindd_cache.c @@ -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; diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c index 61585b668a1..ff004f293ce 100644 --- a/source/winbindd/winbindd_dual.c +++ b/source/winbindd/winbindd_dual.c @@ -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); -- 2.11.4.GIT