mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Fixed few compiler warnings.
This commit is contained in:
parent
a9e00d13cd
commit
53fa8b2a4b
5 changed files with 9 additions and 10 deletions
|
|
@ -292,7 +292,7 @@ iso2022processesc(const void *config, MultibyteCodec_State *state,
|
|||
const unsigned char **inbuf, Py_ssize_t *inleft)
|
||||
{
|
||||
unsigned char charset, designation;
|
||||
Py_ssize_t i, esclen;
|
||||
Py_ssize_t i, esclen = 0;
|
||||
|
||||
for (i = 1;i < MAX_ESCSEQLEN;i++) {
|
||||
if (i >= *inleft)
|
||||
|
|
@ -307,10 +307,9 @@ iso2022processesc(const void *config, MultibyteCodec_State *state,
|
|||
}
|
||||
}
|
||||
|
||||
if (i >= MAX_ESCSEQLEN)
|
||||
return 1; /* unterminated escape sequence */
|
||||
|
||||
switch (esclen) {
|
||||
case 0:
|
||||
return 1; /* unterminated escape sequence */
|
||||
case 3:
|
||||
if (INBYTE2 == '$') {
|
||||
charset = INBYTE3 | CHARSET_DBCS;
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ faulthandler_thread(void *unused)
|
|||
assert(st == PY_LOCK_FAILURE);
|
||||
|
||||
/* get the thread holding the GIL, NULL if no thread hold the GIL */
|
||||
current = _Py_atomic_load_relaxed(&_PyThreadState_Current);
|
||||
current = (PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current);
|
||||
|
||||
write(thread.fd, thread.header, (int)thread.header_len);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue