mirror of
https://github.com/python/cpython.git
synced 2026-04-14 15:50:50 +00:00
[3.13] gh-145092: Fix compiler warning for memchr() and wcschr() returning const pointer (GH-145093) (GH-145101)
(cherry picked from commit faea32b729)
Co-authored-by: Rudi Heitbaum <rudi@heitbaum.com>
This commit is contained in:
parent
0038b58ac9
commit
22af3d5104
2 changed files with 4 additions and 4 deletions
|
|
@ -69,8 +69,8 @@ STRINGLIB(find_char)(const STRINGLIB_CHAR* s, Py_ssize_t n, STRINGLIB_CHAR ch)
|
|||
and UCS4 representations. */
|
||||
if (needle != 0) {
|
||||
do {
|
||||
void *candidate = memchr(p, needle,
|
||||
(e - p) * sizeof(STRINGLIB_CHAR));
|
||||
const void *candidate = memchr(p, needle,
|
||||
(e - p) * sizeof(STRINGLIB_CHAR));
|
||||
if (candidate == NULL)
|
||||
return -1;
|
||||
s1 = p;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue