From e20fb7f04ce874e6ae00133eb453ae83e30939c4 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Tue, 9 Mar 2010 19:27:35 -0300 Subject: [PATCH] fix testcases to silent GCC warning --- tests/errors/compile_time_unraisable_T370.pyx | 1 + tests/run/autotestdict.pyx | 1 + tests/run/bufaccess.pyx | 2 ++ tests/run/for_decrement.pyx | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/errors/compile_time_unraisable_T370.pyx b/tests/errors/compile_time_unraisable_T370.pyx index dba78802..84345056 100644 --- a/tests/errors/compile_time_unraisable_T370.pyx +++ b/tests/errors/compile_time_unraisable_T370.pyx @@ -1,6 +1,7 @@ cdef int raiseit(): raise IndexError +if False: raiseit() _ERRORS = u""" FIXME: provide a good error message here. diff --git a/tests/run/autotestdict.pyx b/tests/run/autotestdict.pyx index 506376b3..c63e883f 100644 --- a/tests/run/autotestdict.pyx +++ b/tests/run/autotestdict.pyx @@ -30,6 +30,7 @@ cdef cdeffunc(): >>> True False """ +cdeffunc() def all_tests_run(): log.sort() diff --git a/tests/run/bufaccess.pyx b/tests/run/bufaccess.pyx index 24a74a97..b6cdc8d8 100644 --- a/tests/run/bufaccess.pyx +++ b/tests/run/bufaccess.pyx @@ -53,6 +53,8 @@ def printbuf(): """ cdef object[int, ndim=2] buf print buf + return + buf[0,0] = 0 @testcase def acquire_release(o1, o2): diff --git a/tests/run/for_decrement.pyx b/tests/run/for_decrement.pyx index 17c6112b..e5a086ca 100644 --- a/tests/run/for_decrement.pyx +++ b/tests/run/for_decrement.pyx @@ -19,7 +19,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=0, l, m + cdef int i, j, k=0, l=10, m=10 for i in range(10): pass for j in range(2,10): pass for k in range(0,10,get_step()): pass -- 2.26.2