From: Lisandro Dalcin Date: Tue, 7 Apr 2009 21:05:52 +0000 (-0300) Subject: cast result of "sizeof()" to "int" in testcase, silents GCC warnings about signed... X-Git-Tag: 0.12.alpha0~327^2~1^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=604363989dc9a0777c5f872606816ae21a003292;p=cython.git cast result of "sizeof()" to "int" in testcase, silents GCC warnings about signed/unsigned comparisons --- diff --git a/tests/run/index.pyx b/tests/run/index.pyx index 58bcf441..223e687a 100644 --- a/tests/run/index.pyx +++ b/tests/run/index.pyx @@ -65,10 +65,10 @@ def test_unsigned_long(): cdef int i cdef unsigned long ix cdef D = {} - for i from 0 <= i < sizeof(unsigned long) * 8: + for i from 0 <= i < sizeof(unsigned long) * 8: ix = (1) << i D[ix] = True - for i from 0 <= i < sizeof(unsigned long) * 8: + for i from 0 <= i < sizeof(unsigned long) * 8: ix = (1) << i assert D[ix] is True del D[ix] @@ -78,10 +78,10 @@ def test_unsigned_short(): cdef int i cdef unsigned short ix cdef D = {} - for i from 0 <= i < sizeof(unsigned short) * 8: + for i from 0 <= i < sizeof(unsigned short) * 8: ix = (1) << i D[ix] = True - for i from 0 <= i < sizeof(unsigned short) * 8: + for i from 0 <= i < sizeof(unsigned short) * 8: ix = (1) << i assert D[ix] is True del D[ix] @@ -91,10 +91,10 @@ def test_long_long(): cdef int i cdef long long ix cdef D = {} - for i from 0 <= i < sizeof(long long) * 8: + for i from 0 <= i < sizeof(long long) * 8: ix = (1) << i D[ix] = True - for i from 0 <= i < sizeof(long long) * 8: + for i from 0 <= i < sizeof(long long) * 8: ix = (1) << i assert D[ix] is True del D[ix]