From: Mark Wooding Date: Thu, 3 May 2012 09:54:16 +0000 (+0100) Subject: mpint.c (touint): Compare unsigned with unsigned, not unsigned long. X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/commitdiff_plain/908ebb29ff621f582b34d48fd4278b60b78379b6?ds=sidebyside mpint.c (touint): Compare unsigned with unsigned, not unsigned long. Otherwise the tests fail on LP64 platforms. --- diff --git a/mpint.c b/mpint.c index 244ff9a..7c1b8cc 100644 --- a/mpint.c +++ b/mpint.c @@ -128,7 +128,7 @@ static int touint(dstr *v) unsigned j = mp_touint(m); int ok = 1; - if (i != j) { + if ((unsigned)i != j) { fputs("\n*** touint failed.\n", stderr); fputs("m = ", stderr); mp_writefile(m, stderr, 10); fprintf(stderr, "\nexpect = %lu; result = %u\n", i, j);