diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-01-30 13:54:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-30 13:54:22 (GMT) |
commit | 86e322f1412be6c5a6c8fa8e73af68b99c42bb18 (patch) | |
tree | 491bbecdb80eb01395bdd4eb65bd316a5e403103 /Objects | |
parent | 62437a2fa9ebd2352dc1e15ae310895eef6ff981 (diff) | |
download | cpython-86e322f1412be6c5a6c8fa8e73af68b99c42bb18.zip cpython-86e322f1412be6c5a6c8fa8e73af68b99c42bb18.tar.gz cpython-86e322f1412be6c5a6c8fa8e73af68b99c42bb18.tar.bz2 |
bpo-40455: Fix gcc10+ warning about writing into a section of offset 0 (GH-24384)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/codeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index f7613e8..69cb31c 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -408,8 +408,8 @@ emit_pair(PyObject **bytes, int *offset, int a, int b) if (_PyBytes_Resize(bytes, len * 2) < 0) return 0; } - unsigned char *lnotab = (unsigned char *) - PyBytes_AS_STRING(*bytes) + *offset; + unsigned char *lnotab = (unsigned char *) PyBytes_AS_STRING(*bytes); + lnotab += *offset; *lnotab++ = a; *lnotab++ = b; *offset += 2; |