From 86e322f1412be6c5a6c8fa8e73af68b99c42bb18 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 30 Jan 2021 13:54:22 +0000 Subject: bpo-40455: Fix gcc10+ warning about writing into a section of offset 0 (GH-24384) --- Python/compile.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 8abb5bb5dc..9927f5abfb 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; -- cgit v1.2.1