diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-12-15 15:36:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-15 15:36:25 (GMT) |
commit | e365c943f24ab577cf7a4bf12bc0d2619ab9ae47 (patch) | |
tree | 7a0b8fe98d4ac648ded57ef6117fd2ac68e0ff21 | |
parent | 4a153a1d3b18803a684cd1bcc2cdf3ede3dbae19 (diff) | |
download | cpython-e365c943f24ab577cf7a4bf12bc0d2619ab9ae47.zip cpython-e365c943f24ab577cf7a4bf12bc0d2619ab9ae47.tar.gz cpython-e365c943f24ab577cf7a4bf12bc0d2619ab9ae47.tar.bz2 |
gh-113172: Fix compiler warnings in Modules/_xxinterpqueuesmodule.c (GH-113173)
Fix compiler waarnings in Modules/_xxinterpqueuesmodule.c
-rw-r--r-- | Modules/_xxinterpqueuesmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_xxinterpqueuesmodule.c b/Modules/_xxinterpqueuesmodule.c index 2cc3a2a..537ba91 100644 --- a/Modules/_xxinterpqueuesmodule.c +++ b/Modules/_xxinterpqueuesmodule.c @@ -234,11 +234,13 @@ static int add_exctype(PyObject *mod, PyObject **p_state_field, const char *qualname, const char *doc, PyObject *base) { +#ifndef NDEBUG const char *dot = strrchr(qualname, '.'); assert(dot != NULL); const char *name = dot+1; assert(*p_state_field == NULL); assert(!PyObject_HasAttrStringWithError(mod, name)); +#endif PyObject *exctype = PyErr_NewExceptionWithDoc(qualname, doc, base, NULL); if (exctype == NULL) { return -1; @@ -1505,7 +1507,7 @@ queuesmod_is_full(PyObject *self, PyObject *args, PyObject *kwds) } int64_t qid = qidarg.id; - int is_full; + int is_full = 0; int err = queue_is_full(&_globals.queues, qid, &is_full); if (handle_queue_error(err, self, qid)) { return NULL; |