From: Timo Sirainen Date: Tue, 2 Mar 2010 08:28:24 +0000 (+0200) Subject: Compiler warning fixes. X-Git-Tag: 2.0.beta4~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a1d918e3a9b01b31e52db7d4e82c6947953b81c;p=thirdparty%2Fdovecot%2Fcore.git Compiler warning fixes. --HG-- branch : HEAD --- diff --git a/src/anvil/test-penalty.c b/src/anvil/test-penalty.c index bd7055cbe6..b710f94ed2 100644 --- a/src/anvil/test-penalty.c +++ b/src/anvil/test-penalty.c @@ -9,7 +9,8 @@ static void test_penalty_checksum(void) { struct penalty *penalty; struct ioloop *ioloop; - time_t t, i, j; + time_t t; + unsigned int i, j; test_begin("penalty"); @@ -23,11 +24,11 @@ static void test_penalty_checksum(void) for (j = I_MIN(1, i-1); j <= i; j++) { test_assert(penalty_get(penalty, "foo", &t) == 5+i); - test_assert(t == 12345678 + i); + test_assert(t == (time_t)(12345678 + i)); test_assert(penalty_has_checksum(penalty, "foo", i)); } test_assert(penalty_get(penalty, "foo", &t) == 5+i); - test_assert(t == 12345678 + i); + test_assert(t == (time_t)(12345678 + i)); test_assert(!penalty_has_checksum(penalty, "foo", j)); } test_assert(penalty_get(penalty, "foo2", &t) == 0); @@ -39,12 +40,12 @@ static void test_penalty_checksum(void) penalty_inc(penalty, "foo", 0, 5 + i); test_assert(penalty_get(penalty, "foo", &t) == 5+i); - test_assert(t == 12345678 + i); + test_assert(t == (time_t)(12345678 + i)); test_assert(!penalty_has_checksum(penalty, "foo", 1)); for (j = 2; j <= i; j++) { test_assert(penalty_get(penalty, "foo", &t) == 5+i); - test_assert(t == 12345678 + i); + test_assert(t == (time_t)(12345678 + i)); test_assert(penalty_has_checksum(penalty, "foo", i)); }