From 604363989dc9a0777c5f872606816ae21a003292 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Tue, 7 Apr 2009 18:05:52 -0300 Subject: [PATCH] cast result of "sizeof()" to "int" in testcase, silents GCC warnings about signed/unsigned comparisons --- tests/run/index.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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] -- 2.26.2