From e5974bef94e235504e262654cef98f7fda6df327 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 3 Dec 2010 07:39:13 +0000 Subject: [PATCH] Compiler warning fixes. --- src/auth/userdb-passwd.c | 4 ++-- src/lib-fs/fs-posix.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/auth/userdb-passwd.c b/src/auth/userdb-passwd.c index e24dc42679..44ab702185 100644 --- a/src/auth/userdb-passwd.c +++ b/src/auth/userdb-passwd.c @@ -105,9 +105,9 @@ static void passwd_iterate_next(struct userdb_iterate_context *_ctx) while ((pw = getpwent()) != NULL) { /* skip entries not in valid UID range. they're users for daemons and such. */ - if (pw->pw_uid >= ctx->set->first_valid_uid && + if (pw->pw_uid >= (uid_t)ctx->set->first_valid_uid && (ctx->set->last_valid_uid == 0 || - pw->pw_uid <= ctx->set->last_valid_uid)) { + pw->pw_uid <= (uid_t)ctx->set->last_valid_uid)) { _ctx->callback(pw->pw_name, _ctx->context); return; } diff --git a/src/lib-fs/fs-posix.c b/src/lib-fs/fs-posix.c index 193b92e9e5..2781dbc77c 100644 --- a/src/lib-fs/fs-posix.c +++ b/src/lib-fs/fs-posix.c @@ -358,7 +358,9 @@ static int fs_posix_write_stream_finish(struct fs_file *_file, bool success) static int fs_posix_lock(struct fs_file *_file, unsigned int secs, struct fs_lock **lock_r) { +#ifdef HAVE_FLOCK struct posix_fs_file *file = (struct posix_fs_file *)_file; +#endif struct posix_fs *fs = (struct posix_fs *)_file->fs; struct dotlock_settings dotlock_set; struct posix_fs_lock fs_lock, *ret_lock; -- 2.47.3