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
|
|
@ -584,7 +584,7 @@ _Py_get_xoption(const PyWideStringList *xoptions, const wchar_t *name)
|
|||
for (Py_ssize_t i=0; i < xoptions->length; i++) {
|
||||
const wchar_t *option = xoptions->items[i];
|
||||
size_t len;
|
||||
wchar_t *sep = wcschr(option, L'=');
|
||||
const wchar_t *sep = wcschr(option, L'=');
|
||||
if (sep != NULL) {
|
||||
len = (sep - option);
|
||||
}
|
||||
|
|
@ -615,7 +615,7 @@ preconfig_init_utf8_mode(PyPreConfig *config, const _PyPreCmdline *cmdline)
|
|||
const wchar_t *xopt;
|
||||
xopt = _Py_get_xoption(&cmdline->xoptions, L"utf8");
|
||||
if (xopt) {
|
||||
wchar_t *sep = wcschr(xopt, L'=');
|
||||
const wchar_t *sep = wcschr(xopt, L'=');
|
||||
if (sep) {
|
||||
xopt = sep + 1;
|
||||
if (wcscmp(xopt, L"1") == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue