https://github.com/python/cpython/commit/369ce438bcea539b4756c706403b618e90bc52ec
commit: 369ce438bcea539b4756c706403b618e90bc52ec
branch: main
author: Andrii Hrimov <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-07-02T18:38:41+03:00
summary:
gh-152813: Fix curses build warning on macOS (GH-152814)
files:
M Modules/_cursesmodule.c
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 6fc671cc6c6803..03e399b252fcfb 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -3137,7 +3137,8 @@ _curses_window_getbkgrnd_impl(PyCursesWindowObject *self)
curses_cell_t wcval = {0};
cursesmodule_state *state = get_cursesmodule_state_by_win(self);
#ifdef HAVE_NCURSESW
- if (wgetbkgrnd(self->win, &wcval) == ERR) {
+ int rtn = wgetbkgrnd(self->win, &wcval); /* avoid -Wunreachable-code on
macOS */
+ if (rtn == ERR) {
curses_window_set_error(self, "wgetbkgrnd", "getbkgrnd");
return NULL;
}
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]