]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Compiler warning fix for 32bit systems
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 17 Dec 2016 08:55:01 +0000 (10:55 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 17 Dec 2016 08:55:01 +0000 (10:55 +0200)
src/lib/test-malloc-overflow.c

index 8a2cc8235913c94c5493f8da072edbadc0769fc1..d23ff1883e871eaf040ce9788302adad6b899763 100644 (file)
@@ -32,7 +32,7 @@ static void test_malloc_overflow_add(void)
 
        test_begin("MALLOC_ADD()");
        /* check that no compiler warning is given */
-       test_assert(MALLOC_ADD(2, n) == 2+n);
+       test_assert(MALLOC_ADD(2, n) == 2U+n);
        for (unsigned int i = 0; i < N_ELEMENTS(tests); i++) {
                test_assert_idx(MALLOC_ADD(tests[i].a, tests[i].b) == tests[i].a + tests[i].b, i);
                test_assert_idx(MALLOC_ADD(tests[i].b, tests[i].a) == tests[i].b + tests[i].a, i);