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) --- Objects/codeobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Objects/codeobject.c') diff --git a/Objects/codeobject.c b/Objects/codeobject.c index f7613e8fd2..69cb31c1ab 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; -- cgit v1.2.1