Skip to content

Commit 415d080

Browse files
committed
cython warnings: avoid maybe uninitialized
1 parent c01a92b commit 415d080

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cysignals/signals.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ cdef int sig_raise_exception "sig_raise_exception"(int sig, const char* msg) exc
198198
PyErr_Format(SystemError, "unknown signal number %i", sig)
199199

200200
# Save exception in cysigs.exc_value
201-
cdef PyObject* typ
202-
cdef PyObject* val
203-
cdef PyObject* tb
201+
cdef PyObject* typ = NULL
202+
cdef PyObject* val = NULL
203+
cdef PyObject* tb = NULL
204204
PyErr_Fetch(&typ, &val, &tb)
205205
PyErr_NormalizeException(&typ, &val, &tb)
206206
Py_XINCREF(val)

src/cysignals/tests.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ def test_thread_sig_block(long delay=DEFAULT_DELAY):
12801280
>>> test_thread_sig_block()
12811281
12821282
"""
1283-
cdef pthread_t t1, t2
1283+
cdef pthread_t t1 = 0, t2 = 0
12841284
with nogil:
12851285
sig_on()
12861286
if pthread_create(&t1, NULL, func_thread_sig_block, NULL):

0 commit comments

Comments
 (0)