mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #8914: fix various warnings from the Clang static analyzer v254.
This commit is contained in:
parent
79da6b7075
commit
b94767ff44
36 changed files with 69 additions and 84 deletions
|
@ -577,7 +577,6 @@ Py_Main(int argc, wchar_t **argv)
|
|||
if ((p = Py_GETENV("PYTHONEXECUTABLE")) && *p != '\0') {
|
||||
wchar_t* buffer;
|
||||
size_t len = strlen(p);
|
||||
size_t r;
|
||||
|
||||
buffer = malloc(len * sizeof(wchar_t));
|
||||
if (buffer == NULL) {
|
||||
|
@ -585,7 +584,7 @@ Py_Main(int argc, wchar_t **argv)
|
|||
"not enough memory to copy PYTHONEXECUTABLE");
|
||||
}
|
||||
|
||||
r = mbstowcs(buffer, p, len);
|
||||
mbstowcs(buffer, p, len);
|
||||
Py_SetProgramName(buffer);
|
||||
/* buffer is now handed off - do not free */
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue