]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Compiler warning fixes.
authorTimo Sirainen <tss@iki.fi>
Fri, 3 Dec 2010 07:39:13 +0000 (07:39 +0000)
committerTimo Sirainen <tss@iki.fi>
Fri, 3 Dec 2010 07:39:13 +0000 (07:39 +0000)
src/auth/userdb-passwd.c
src/lib-fs/fs-posix.c

index e24dc426793932a4ef867f052e96da230a5f5945..44ab70218538f7d9a53c1f89c6dd60d470c095c7 100644 (file)
@@ -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;
                }
index 193b92e9e50a02d5c3de243b2149ebceac6f407a..2781dbc77c33fbf1198643d4edae5b391da30edb 100644 (file)
@@ -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;