Index: tests/OFList/OFList.m ================================================================== --- tests/OFList/OFList.m +++ tests/OFList/OFList.m @@ -18,17 +18,17 @@ #import "OFList.h" #define NUM_TESTS 5 #define SUCCESS \ { \ - printf("\r\033[1;%dmTests successful: %d/%d\033[0m", \ + printf("\r\033[1;%dmTests successful: %zd/%d\033[0m", \ (i == NUM_TESTS - 1 ? 32 : 33), i + 1, NUM_TESTS); \ fflush(stdout); \ } #define FAIL \ { \ - printf("\r\033[K\033[1;31mTest %d/%d failed!\033[m\n", \ + printf("\r\033[K\033[1;31mTest %zd/%d failed!\033[m\n", \ i + 1, NUM_TESTS); \ return 1; \ } #define CHECK(cond) \ if (cond) \ Index: tests/OFXMLFactory/OFXMLFactory.m ================================================================== --- tests/OFXMLFactory/OFXMLFactory.m +++ tests/OFXMLFactory/OFXMLFactory.m @@ -9,30 +9,31 @@ * the packaging of this file. */ #import "config.h" +#import #import #import #import "OFXMLFactory.h" #define NUM_TESTS 10 -static int i; +static size_t i; inline void check_result(char *result, const char *should) { i++; if (!strcmp(result, should)) { - printf("\r\033[1;%dmTests successful: %2d/%d\033[0m", + printf("\r\033[1;%dmTests successful: %2zd/%d\033[0m", (i == NUM_TESTS ? 32 : 33), i, NUM_TESTS); fflush(stdout); } else { - printf("\r\033[K\033[1;31mTest %d/%d failed!\033[0m\n", + printf("\r\033[K\033[1;31mTest %zd/%d failed!\033[0m\n", i, NUM_TESTS); printf("%s is NOT expected result!\n", result); exit(1); }