This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2017年08月25日 12:21 by skrah, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 3206 | merged | skrah, 2017年08月25日 16:09 | |
| PR 3518 | merged | vstinner, 2017年09月12日 17:39 | |
| Messages (5) | |||
|---|---|---|---|
| msg300834 - (view) | Author: Stefan Krah (skrah) * (Python committer) | Date: 2017年08月25日 12:21 | |
The last fall-through warning is in _codecs_iso2022.c. IMO the current code is equivalent to this, but I'm no codecs expert at all: diff --git a/Modules/cjkcodecs/_codecs_iso2022.c b/Modules/cjkcodecs/_codecs_iso2022.c index 1ce4218f30..abf214880f 100644 --- a/Modules/cjkcodecs/_codecs_iso2022.c +++ b/Modules/cjkcodecs/_codecs_iso2022.c @@ -807,15 +807,9 @@ jisx0213_encoder(const Py_UCS4 *data, Py_ssize_t *length, void *config) case 2: /* second character of unicode pair */ coded = find_pairencmap((ucs2_t)data[0], (ucs2_t)data[1], jisx0213_pair_encmap, JISX0213_ENCPAIRS); - if (coded == DBCINV) { - *length = 1; - coded = find_pairencmap((ucs2_t)data[0], 0, - jisx0213_pair_encmap, JISX0213_ENCPAIRS); - if (coded == DBCINV) - return MAP_UNMAPPABLE; - } - else + if (coded != DBCINV) { return coded; + /* fall through */ case -1: /* flush unterminated */ *length = 1; |
|||
| msg300836 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年08月25日 13:10 | |
This looks equivalent to me. |
|||
| msg300844 - (view) | Author: Stefan Krah (skrah) * (Python committer) | Date: 2017年08月25日 16:31 | |
New changeset 138753c1b96b5e06a5c5d409fa4cae5e2fe1108b by Stefan Krah in branch 'master': bpo-31275: Small refactoring to silence a fall-through warning. (#3206) https://github.com/python/cpython/commit/138753c1b96b5e06a5c5d409fa4cae5e2fe1108b |
|||
| msg300846 - (view) | Author: Stefan Krah (skrah) * (Python committer) | Date: 2017年08月25日 16:32 | |
Thanks, Serhiy! |
|||
| msg302004 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2017年09月12日 23:09 | |
New changeset c0e77364ca29df6cfb311e79892955c92bd8e595 by Victor Stinner in branch '3.6': [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0 (#3518) https://github.com/python/cpython/commit/c0e77364ca29df6cfb311e79892955c92bd8e595 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:51 | admin | set | github: 75458 |
| 2017年09月12日 23:15:33 | vstinner | set | versions: + Python 3.6 |
| 2017年09月12日 23:09:46 | vstinner | set | messages: + msg302004 |
| 2017年09月12日 17:39:15 | vstinner | set | pull_requests: + pull_request3514 |
| 2017年08月25日 16:32:52 | skrah | set | status: open -> closed components: + Build versions: + Python 3.7 messages: + msg300846 type: compile error resolution: fixed stage: resolved |
| 2017年08月25日 16:31:26 | skrah | set | messages: + msg300844 |
| 2017年08月25日 16:09:26 | skrah | set | pull_requests: + pull_request3243 |
| 2017年08月25日 13:10:33 | serhiy.storchaka | set | messages: + msg300836 |
| 2017年08月25日 12:21:15 | skrah | create | |