commit 37f62f5d4e914963adfbf2085f5fd9294d79b497 from: Stefan Sperling date: Fri Oct 16 23:07:28 2020 UTC fix another format string issue in results_test.c Cast ARRAYLIST_IDX result to unsigned long and use %lu in the format string. Clang 10.0.1 complained as follows: results_test.c:148:9: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] ARRAYLIST_IDX(c, result->chunks), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ commit - 6fc23bd07d48a9fe01f057ca64e870cd8ebd6025 commit + 37f62f5d4e914963adfbf2085f5fd9294d79b497 blob - fabf86c6e5076b4eda2546236f717f27e43cda0b blob + ef2746f5db885fe20cd242b5b7cb6764e9e49dcb --- test/results_test.c +++ test/results_test.c @@ -144,8 +144,8 @@ void test_plus_after_plus(void) ARRAYLIST_FOREACH(c, result->chunks) { enum diff_chunk_type t = diff_chunk_type(c); - printf("[%d] %s lines L%d R%d @L %lld @R %lld\n", - ARRAYLIST_IDX(c, result->chunks), + printf("[%lu] %s lines L%d R%d @L %lld @R %lld\n", + (unsigned long)ARRAYLIST_IDX(c, result->chunks), (t == CHUNK_MINUS ? "minus" : (t == CHUNK_PLUS ? "plus" : (t == CHUNK_SAME ? "same" : "?"))),