mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #28152: Fix -Wunreachable-code warning on clang
Replace C if() with precompiler #if to fix a warning on dead code when using clang.
This commit is contained in:
parent
9a2329f9e1
commit
44d9bea1b8
1 changed files with 5 additions and 5 deletions
|
@ -998,13 +998,13 @@ read_directory(PyObject *archive)
|
||||||
goto file_error;
|
goto file_error;
|
||||||
}
|
}
|
||||||
name[name_size] = '\0'; /* Add terminating null byte */
|
name[name_size] = '\0'; /* Add terminating null byte */
|
||||||
if (SEP != '/') {
|
#if SEP != '/'
|
||||||
for (i = 0; i < name_size; i++) {
|
for (i = 0; i < name_size; i++) {
|
||||||
if (name[i] == '/') {
|
if (name[i] == '/') {
|
||||||
name[i] = SEP;
|
name[i] = SEP;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* Skip the rest of the header.
|
/* Skip the rest of the header.
|
||||||
* On Windows, calling fseek to skip over the fields we don't use is
|
* On Windows, calling fseek to skip over the fields we don't use is
|
||||||
* slower than reading the data because fseek flushes stdio's
|
* slower than reading the data because fseek flushes stdio's
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue