From: Adam Dickmeiss Date: Fri, 25 Dec 2009 00:11:11 +0000 (+0100) Subject: Fix constant (-2^31) X-Git-Tag: v4.0.0~64 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=0988d80d70a06b9694664141f7068966d91caf3d;p=yaz-moved-to-github.git Fix constant (-2^31) --- diff --git a/test/tstodr.c b/test/tstodr.c index 3d722ed..3f6fecd 100644 --- a/test/tstodr.c +++ b/test/tstodr.c @@ -223,7 +223,7 @@ static void tst_berint(ODR encode, ODR decode) ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, 2147483647); - val = -2147483648L; /* -2^31 */ + val = (Odr_int) -2147483647L -1; /* -2^31 */ odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); @@ -239,7 +239,7 @@ static void tst_berint(ODR encode, ODR decode) odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); - YAZ_CHECK_EQ(ret_val, -2147483648L); + YAZ_CHECK_EQ(ret_val, (Odr_int) -2147483647L -1); val = (Odr_int) 2 * 2147483648UL; /* 2^32 */ odr_reset(encode);