1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/micropython/fix_clobbered_longjmp.patch
2021-03-30 16:29:31 +00:00

17 lines
589 B
Diff

Fix the following error:
main.c: In function 'main_':
main.c:595:22: error: variable 'subpkg_tried' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
595 | bool subpkg_tried = false;
| ^~~~~~~~~~~~
--- micropython-1.14.orig/ports/unix/main.c
+++ micropython-1.14/ports/unix/main.c
@@ -592,7 +592,7 @@
mp_obj_t mod;
nlr_buf_t nlr;
- bool subpkg_tried = false;
+ static bool subpkg_tried = false;
reimport:
if (nlr_push(&nlr) == 0) {