summaryrefslogtreecommitdiff
path: root/tests/run/index.pyx
diff options
context:
space:
mode:
authorLisandro Dalcin <dalcinl@gmail.com>2009-04-07 18:05:52 -0300
committerLisandro Dalcin <dalcinl@gmail.com>2009-04-07 18:05:52 -0300
commit604363989dc9a0777c5f872606816ae21a003292 (patch)
treeeb8027cddb3c72125d91e80ed0fb453699460729 /tests/run/index.pyx
parent15684a52664c6c2f1cb7dd1635941c1513389b3c (diff)
downloadcython-604363989dc9a0777c5f872606816ae21a003292.tar.gz
cast result of "sizeof()" to "int" in testcase, silents GCC warnings about signed/unsigned comparisons
Diffstat (limited to 'tests/run/index.pyx')
-rw-r--r--tests/run/index.pyx12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/run/index.pyx b/tests/run/index.pyx
index 58bcf4413..223e687ac 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 < <int>sizeof(unsigned long) * 8:
ix = (<unsigned long>1) << i
D[ix] = True
- for i from 0 <= i < sizeof(unsigned long) * 8:
+ for i from 0 <= i < <int>sizeof(unsigned long) * 8:
ix = (<unsigned long>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 < <int>sizeof(unsigned short) * 8:
ix = (<unsigned short>1) << i
D[ix] = True
- for i from 0 <= i < sizeof(unsigned short) * 8:
+ for i from 0 <= i < <int>sizeof(unsigned short) * 8:
ix = (<unsigned short>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 < <int>sizeof(long long) * 8:
ix = (<long long>1) << i
D[ix] = True
- for i from 0 <= i < sizeof(long long) * 8:
+ for i from 0 <= i < <int>sizeof(long long) * 8:
ix = (<long long>1) << i
assert D[ix] is True
del D[ix]