aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2022-05-31 01:19:32 -0700
committerPaul Eggert2022-05-31 01:26:47 -0700
commit877be9098ee3ecc041216d39dbb20d0d044a46c0 (patch)
tree5212e7e488cfc977a37c8e6c77208712207a81cd /src
parenta1c19dfca4b1e0b84a958aee33c8212dc69cd2cb (diff)
downloademacs-877be9098ee3ecc041216d39dbb20d0d044a46c0.tar.gz
emacs-877be9098ee3ecc041216d39dbb20d0d044a46c0.zip
Pacify GCC 12 -fanalyzer in x_popup_menu_1
* src/menu.c (x_popup_menu_1): Rework to avoid unnecessary initialization and test. This also pacifies GCC 12.
Diffstat (limited to 'src')
-rw-r--r--src/menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/menu.c b/src/menu.c
index 398bf9329ff..eeb0c9a7e5b 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1118,7 +1118,7 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
1118 Lisp_Object title; 1118 Lisp_Object title;
1119 const char *error_name = NULL; 1119 const char *error_name = NULL;
1120 Lisp_Object selection = Qnil; 1120 Lisp_Object selection = Qnil;
1121 struct frame *f = NULL; 1121 struct frame *f;
1122 Lisp_Object x, y, window; 1122 Lisp_Object x, y, window;
1123 int menuflags = 0; 1123 int menuflags = 0;
1124 specpdl_ref specpdl_count = SPECPDL_INDEX (); 1124 specpdl_ref specpdl_count = SPECPDL_INDEX ();
@@ -1269,9 +1269,9 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
1269 } 1269 }
1270 } 1270 }
1271 else 1271 else
1272 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, 1272 /* ??? Not really clean; should be Qwindow_or_framep
1273 but I don't want to make one now. */ 1273 but I don't want to make one now. */
1274 CHECK_WINDOW (window); 1274 wrong_type_argument (Qwindowp, window);
1275 1275
1276 xpos += check_integer_range (x, 1276 xpos += check_integer_range (x,
1277 (xpos < INT_MIN - MOST_NEGATIVE_FIXNUM 1277 (xpos < INT_MIN - MOST_NEGATIVE_FIXNUM