diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-12-05 16:55:36 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-12-05 16:55:36 (GMT) |
commit | 44d9bea1b823ed1ac25a78bb350b03848e59ac80 (patch) | |
tree | 4b289da7054393e824467ce38170a3fc9a8c77e2 /Modules | |
parent | 9a2329f9e116e8bcc82803bbd0ef65b7db083c34 (diff) | |
download | cpython-44d9bea1b823ed1ac25a78bb350b03848e59ac80.zip cpython-44d9bea1b823ed1ac25a78bb350b03848e59ac80.tar.gz cpython-44d9bea1b823ed1ac25a78bb350b03848e59ac80.tar.bz2 |
Issue #28152: Fix -Wunreachable-code warning on clang
Replace C if() with precompiler #if to fix a warning on dead code when using
clang.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/zipimport.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c index 59046aa..950e4f4 100644 --- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -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 |