changeset 21324:ce210ada8bc2

lib: Compiler warning fix for 32bit systems
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sat, 17 Dec 2016 10:55:01 +0200
parents d223fad9767f
children 915b968cae77
files src/lib/test-malloc-overflow.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/test-malloc-overflow.c	Mon Dec 12 07:28:00 2016 +0200
+++ b/src/lib/test-malloc-overflow.c	Sat Dec 17 10:55:01 2016 +0200
@@ -32,7 +32,7 @@
 
 	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);