Commit ee68604e authored by Stefan Behnel's avatar Stefan Behnel

fix C compiler warnings about unused variables in tests

parent 56ab62c4
...@@ -67,6 +67,8 @@ def except_as_no_raise_does_not_touch_target(a): ...@@ -67,6 +67,8 @@ def except_as_no_raise_does_not_touch_target(a):
>>> except_as_no_raise_does_not_touch_target(TypeError) >>> except_as_no_raise_does_not_touch_target(TypeError)
(1, 1) (1, 1)
""" """
d = a # mark used
b = 1 b = 1
try: try:
i = 1 i = 1
......
...@@ -63,6 +63,8 @@ def double_except_no_raise(a,b): ...@@ -63,6 +63,8 @@ def double_except_no_raise(a,b):
>>> double_except_no_raise(TypeError, ValueError) >>> double_except_no_raise(TypeError, ValueError)
1 1
""" """
d = a or b # mark used
cdef int i cdef int i
try: try:
i = 1 i = 1
...@@ -99,6 +101,8 @@ def target_except_no_raise(a): ...@@ -99,6 +101,8 @@ def target_except_no_raise(a):
>>> target_except_no_raise(TypeError) >>> target_except_no_raise(TypeError)
1 1
""" """
d = a # mark used
cdef int i cdef int i
try: try:
i = 1 i = 1
...@@ -156,6 +160,8 @@ def normal_and_bare_except_no_raise(a): ...@@ -156,6 +160,8 @@ def normal_and_bare_except_no_raise(a):
>>> normal_and_bare_except_no_raise(TypeError) >>> normal_and_bare_except_no_raise(TypeError)
1 1
""" """
d = a # mark used
cdef int i cdef int i
try: try:
i = 1 i = 1
...@@ -195,6 +201,8 @@ def tuple_except_index_target_no_raise(a, b, c): ...@@ -195,6 +201,8 @@ def tuple_except_index_target_no_raise(a, b, c):
>>> l >>> l
[None, None] [None, None]
""" """
d = a or b or c # mark used
cdef int i cdef int i
try: try:
i = 1 i = 1
...@@ -275,6 +283,8 @@ def bare_except_reraise_no_raise(l): ...@@ -275,6 +283,8 @@ def bare_except_reraise_no_raise(l):
>>> l >>> l
[None] [None]
""" """
d = l # mark used
cdef int i cdef int i
try: try:
i = 1 i = 1
...@@ -316,6 +326,8 @@ def except_as_no_raise(a): ...@@ -316,6 +326,8 @@ def except_as_no_raise(a):
>>> except_as_no_raise(TypeError) >>> except_as_no_raise(TypeError)
1 1
""" """
d = a # mark used
try: try:
i = 1 i = 1
except a as b: except a as b:
...@@ -351,6 +363,8 @@ def except_as_no_raise_does_not_touch_target(a): ...@@ -351,6 +363,8 @@ def except_as_no_raise_does_not_touch_target(a):
>>> b >>> b
1 1
""" """
d = a # mark used
b = 1 b = 1
try: try:
i = 1 i = 1
...@@ -411,6 +425,8 @@ def complete_except_as_no_raise(a, b): ...@@ -411,6 +425,8 @@ def complete_except_as_no_raise(a, b):
>>> complete_except_as_no_raise(TypeError, ValueError) >>> complete_except_as_no_raise(TypeError, ValueError)
5 5
""" """
d = a or b # mark used
try: try:
i = 1 i = 1
except (a, b) as c: except (a, b) as c:
......
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