diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2023-02-06 12:25:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 12:25:31 (GMT) |
commit | 46416b9004b687856eaa73e5d48520cd768bbf82 (patch) | |
tree | e5a0a6c9e9ed8cb565ac07a37d4299a5cdbd2302 /Modules | |
parent | 9ef7e75434587fc8f167d73eee5dd9bdca62714b (diff) | |
download | cpython-46416b9004b687856eaa73e5d48520cd768bbf82.zip cpython-46416b9004b687856eaa73e5d48520cd768bbf82.tar.gz cpython-46416b9004b687856eaa73e5d48520cd768bbf82.tar.bz2 |
gh-76961: Fix buildbot failures in test_pep3118 (#101587)
This PR fixes the buildbot failures introduced by the merge of #5561, by restricting the relevant tests to something that should work on both 32-bit and 64-bit platforms. It also silences some compiler warnings introduced in that PR.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/stgdict.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c index dac772e..83a5275 100644 --- a/Modules/_ctypes/stgdict.c +++ b/Modules/_ctypes/stgdict.c @@ -339,7 +339,7 @@ MakeAnonFields(PyObject *type) /* Allocate a memory block for a pep3118 format string, copy prefix (if - non-null) into it and append `{padding}x` to the end. + non-null) into it and append `{padding}x` to the end. Returns NULL on failure, with the error indicator set. */ char * @@ -355,8 +355,8 @@ _ctypes_alloc_format_padding(const char *prefix, Py_ssize_t padding) return _ctypes_alloc_format_string(prefix, "x"); } - int ret = PyOS_snprintf(buf, sizeof(buf), "%zdx", padding); - assert(0 <= ret && ret < sizeof(buf)); + int ret = PyOS_snprintf(buf, sizeof(buf), "%zdx", padding); (void)ret; + assert(0 <= ret && ret < (Py_ssize_t)sizeof(buf)); return _ctypes_alloc_format_string(prefix, buf); } |