Commit 60436398 authored by Lisandro Dalcin's avatar Lisandro Dalcin

cast result of "sizeof()" to "int" in testcase, silents GCC warnings about...

cast result of "sizeof()" to "int" in testcase, silents GCC warnings about signed/unsigned comparisons
parent 15684a52
......@@ -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]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment