diff options
author | Dong-hee Na <donghee.na@python.org> | 2023-05-14 11:03:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 11:03:30 (GMT) |
commit | 178153c9a6f32da8d132aae591c0cfebea7c6366 (patch) | |
tree | 2ba237f1f70f2728856823a45eddfee8252d6d5a | |
parent | 080a5961527473af182b025bb29e0c52d43fd49e (diff) | |
download | cpython-178153c9a6f32da8d132aae591c0cfebea7c6366.zip cpython-178153c9a6f32da8d132aae591c0cfebea7c6366.tar.gz cpython-178153c9a6f32da8d132aae591c0cfebea7c6366.tar.bz2 |
gh-87092: avoid gcc warning on uninitialized struct field in assemble.c (#104460)
-rw-r--r-- | Python/assemble.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/assemble.c b/Python/assemble.c index 6889831..8789d8e 100644 --- a/Python/assemble.c +++ b/Python/assemble.c @@ -128,7 +128,7 @@ assemble_emit_exception_table_entry(struct assembler *a, int start, int end, assert(end > start); int target = handler->h_offset; int depth = handler->h_startdepth - 1; - if (handler->h_preserve_lasti) { + if (handler->h_preserve_lasti > 0) { depth -= 1; } assert(depth >= 0); @@ -146,6 +146,7 @@ assemble_exception_table(struct assembler *a, instr_sequence *instrs) int ioffset = 0; _PyCompile_ExceptHandlerInfo handler; handler.h_offset = -1; + handler.h_preserve_lasti = -1; int start = -1; for (int i = 0; i < instrs->s_used; i++) { instruction *instr = &instrs->s_instrs[i]; |