GeezerVison is showing github.com — [3.13] gh-146615: Fix format specifiers in extension modules (GH-1466… · serhiy-storchaka/cpython@6e5c933
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: Modules/_asynciomodule.c +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1943,7 +1943,7 @@ enter_task(asyncio_state *state, PyObject *loop, PyObject *task) | 1943 | 1943 | PyExc_RuntimeError, | 1944 | 1944 | "Cannot enter into task %R while another " \ | 1945 | 1945 | "task %R is being executed.", | 1946 | | - task, item, NULL); | | 1946 | + task, item); | 1947 | 1947 | Py_DECREF(item); | 1948 | 1948 | return -1; | 1949 | 1949 | } | @@ -2062,7 +2062,7 @@ _asyncio_Task___init___impl(TaskObj *self, PyObject *coro, PyObject *loop, | 2062 | 2062 | self->task_log_destroy_pending = 0; | 2063 | 2063 | PyErr_Format(PyExc_TypeError, | 2064 | 2064 | "a coroutine was expected, got %R", | 2065 | | - coro, NULL); | | 2065 | + coro); | 2066 | 2066 | return -1; | 2067 | 2067 | } | 2068 | 2068 |
| |
Collapse file Copy file name to clipboardExpand all lines: Modules/_ssl.c +4-8Lines changed: 4 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -3537,15 +3537,11 @@ _ssl__SSLContext_verify_flags_set_impl(PySSLContext *self, PyObject *value) | 3537 | 3537 | static int | 3538 | 3538 | set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what) | 3539 | 3539 | { | 3540 | | - long v; | | 3540 | + int v; | 3541 | 3541 | int result; | 3542 | 3542 |
| 3543 | | - if (!PyArg_Parse(arg, "l", &v)) | | 3543 | + if (!PyArg_Parse(arg, "i", &v)) | 3544 | 3544 | return -1; | 3545 | | - if (v > INT_MAX) { | 3546 | | - PyErr_SetString(PyExc_OverflowError, "Option is too long"); | 3547 | | - return -1; | 3548 | | - } | 3549 | 3545 |
| 3550 | 3546 | switch(self->protocol) { | 3551 | 3547 | case PY_SSL_VERSION_TLS_CLIENT: /* fall through */ | @@ -3580,7 +3576,7 @@ set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what) | 3580 | 3576 | break; | 3581 | 3577 | default: | 3582 | 3578 | PyErr_Format(PyExc_ValueError, | 3583 | | - "Unsupported TLS/SSL version 0x%x", v); | | 3579 | + "Unsupported TLS/SSL version 0x%x", (unsigned)v); | 3584 | 3580 | return -1; | 3585 | 3581 | } | 3586 | 3582 |
| @@ -3614,7 +3610,7 @@ set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what) | 3614 | 3610 | } | 3615 | 3611 | if (result == 0) { | 3616 | 3612 | PyErr_Format(PyExc_ValueError, | 3617 | | - "Unsupported protocol version 0x%x", v); | | 3613 | + "Unsupported protocol version 0x%x", (unsigned)v); | 3618 | 3614 | return -1; | 3619 | 3615 | } | 3620 | 3616 | return 0; | |
Collapse file Copy file name to clipboardExpand all lines: Modules/_zoneinfo.c +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -989,7 +989,7 @@ load_data(zoneinfo_state *state, PyZoneInfo_ZoneInfo *self, PyObject *file_obj) | 989 | 989 | } | 990 | 990 |
| 991 | 991 | if (!PyTuple_CheckExact(data_tuple)) { | 992 | | - PyErr_Format(PyExc_TypeError, "Invalid data result type: %r", | | 992 | + PyErr_Format(PyExc_TypeError, "Invalid data result type: %R", | 993 | 993 | data_tuple); | 994 | 994 | goto error; | 995 | 995 | } | |
|