summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2021-01-30 13:54:22 (GMT)
committerGitHub <noreply@github.com>2021-01-30 13:54:22 (GMT)
commit86e322f1412be6c5a6c8fa8e73af68b99c42bb18 (patch)
tree491bbecdb80eb01395bdd4eb65bd316a5e403103 /Python/compile.c
parent62437a2fa9ebd2352dc1e15ae310895eef6ff981 (diff)
downloadcpython-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 'Python/compile.c')
-rw-r--r--Python/compile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 8abb5bb..9927f5a 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -5577,9 +5577,8 @@ assemble_emit_linetable_pair(struct assembler *a, int bdelta, int ldelta)
if (_PyBytes_Resize(&a->a_lnotab, len * 2) < 0)
return 0;
}
- unsigned char *lnotab = (unsigned char *)
- PyBytes_AS_STRING(a->a_lnotab) + a->a_lnotab_off;
-
+ unsigned char *lnotab = (unsigned char *) PyBytes_AS_STRING(a->a_lnotab);
+ lnotab += a->a_lnotab_off;
a->a_lnotab_off += 2;
*lnotab++ = bdelta;
*lnotab++ = ldelta;