From f5bdee69facb521421e6e5dd198d3061cd716951 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 27 Apr 2017 13:42:30 -0400 Subject: [PATCH] Avoid compiler warnings * libmailutils/auth/system.c (mu_authenticate_system): Only declare auth_data if HAVE_SHADOW_H is defined. * libmailutils/base/copyfile.c (copy_regular_file): Cast trans[0] to intptr_t instead of int. --- libmailutils/auth/system.c | 2 +- libmailutils/base/copyfile.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libmailutils/auth/system.c b/libmailutils/auth/system.c index d6a8db065..6a7fdb236 100644 --- a/libmailutils/auth/system.c +++ b/libmailutils/auth/system.c @@ -119,9 +119,9 @@ mu_authenticate_system (struct mu_auth_data **return_data MU_ARG_UNUSED, void *func_data MU_ARG_UNUSED, void *call_data) { +#ifdef HAVE_SHADOW_H const struct mu_auth_data *auth_data = key; -#ifdef HAVE_SHADOW_H char *pass = call_data; if (auth_data) diff --git a/libmailutils/base/copyfile.c b/libmailutils/base/copyfile.c index 9a72228ce..dd9dbac7e 100644 --- a/libmailutils/base/copyfile.c +++ b/libmailutils/base/copyfile.c @@ -163,7 +163,7 @@ copy_regular_file (const char *srcpath, const char *dstpath, int flags, rc = mu_stream_ioctl (dst, MU_IOCTL_TRANSPORT, MU_IOCTL_OP_GET, trans); if (rc == 0) { - if (fchmod ((int) trans[0], mode)) + if (fchmod ((intptr_t) trans[0], mode)) { mu_debug (MU_DEBCAT_STREAM, MU_DEBUG_ERROR, (_("%s: cannot chmod: %s"), @@ -193,7 +193,7 @@ copy_regular_file (const char *srcpath, const char *dstpath, int flags, if (gid != -1) { - if (fchown ((int) trans[0], uid, gid)) + if (fchown ((intptr_t) trans[0], uid, gid)) { mu_debug (MU_DEBCAT_STREAM, MU_DEBUG_ERROR, (_("%s: cannot chown to %lu.%lu: %s"), -- 2.12.2