Kaydet (Commit) 44d9bea1 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #28152: Fix -Wunreachable-code warning on clang

Replace C if() with precompiler #if to fix a warning on dead code when using
clang.
üst 9a2329f9
......@@ -998,13 +998,13 @@ read_directory(PyObject *archive)
goto file_error;
}
name[name_size] = '\0'; /* Add terminating null byte */
if (SEP != '/') {
for (i = 0; i < name_size; i++) {
if (name[i] == '/') {
name[i] = SEP;
}
#if SEP != '/'
for (i = 0; i < name_size; i++) {
if (name[i] == '/') {
name[i] = SEP;
}
}
#endif
/* Skip the rest of the header.
* On Windows, calling fseek to skip over the fields we don't use is
* slower than reading the data because fseek flushes stdio's
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment