From 83740a0062129eb75870d28217d0b6a396380308 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Mon, 16 Feb 2009 14:07:34 -0200 Subject: [PATCH] some fixes in order to silent GCC warnings about unused stuff --- tests/compile/cnamespec.pyx | 3 +++ tests/compile/funcptr.pyx | 4 ++++ tests/run/for_decrement.pyx | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/compile/cnamespec.pyx b/tests/compile/cnamespec.pyx index fec88d39..5ddc43ea 100644 --- a/tests/compile/cnamespec.pyx +++ b/tests/compile/cnamespec.pyx @@ -15,3 +15,6 @@ cdef double spam "c_spam" (int i, float f): b = p.i p.i = x p.i = y + +cdef inline double spam2 "c_spam2" (int i, float f): + return spam(i,f) diff --git a/tests/compile/funcptr.pyx b/tests/compile/funcptr.pyx index c6ca8c4a..64fa2908 100644 --- a/tests/compile/funcptr.pyx +++ b/tests/compile/funcptr.pyx @@ -4,3 +4,7 @@ cdef int grail(): spam = grail spam() +ctypedef int funcptr_t() + +cdef inline funcptr_t* dummy(): + return &grail diff --git a/tests/run/for_decrement.pyx b/tests/run/for_decrement.pyx index f9826fdd..39d40d63 100644 --- a/tests/run/for_decrement.pyx +++ b/tests/run/for_decrement.pyx @@ -23,7 +23,7 @@ def range_loop_indices(): Optimized integer for loops using range() should follow Python behavior, and leave the index variable with the last value of the range. """ - cdef int i, j, k, l, m + cdef int i, j, k=0, l, m for i in range(10): pass for j in range(2,10): pass for k in range(0,10,get_step()): pass @@ -40,4 +40,4 @@ def from_loop_indices(): for i from 0 <= i < 10 by get_step(): pass for j from 0 <= j < 10: pass for k from 10 > k > 0: pass - return i, j, k \ No newline at end of file + return i, j, k -- 2.26.2