From 6d1f7feedacad0112846d84232b3d4a8dd96b740 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Sun, 6 Mar 2011 22:43:11 -0800 Subject: [PATCH] * xmenu.c (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const" since they might point to immutable storage. --- src/ChangeLog | 2 ++ src/xmenu.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 95cc4a5d633..f1b08f62b8e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * xmenu.c (menu_highlight_callback): Now static. (set_frame_menubar): Remove unused local. (xmenu_show): Rename parameter to avoid shadowing. + (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const" + since they might point to immutable storage. * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Add a FIXME comment, since the code still doesn't look right. diff --git a/src/xmenu.c b/src/xmenu.c index 64d74ee66d7..a64b305238b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1662,7 +1662,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, { /* Create a new pane. */ Lisp_Object pane_name, prefix; - char *pane_string; + const char *pane_string; pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME); prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX); @@ -2010,7 +2010,7 @@ xdialog_show (FRAME_PTR f, representing the text label and buttons. */ { Lisp_Object pane_name, prefix; - char *pane_string; + const char *pane_string; pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME]; prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX]; pane_string = (NILP (pane_name) @@ -2305,7 +2305,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, { /* Create a new pane. */ Lisp_Object pane_name, prefix; - char *pane_string; + const char *pane_string; maxlines = max (maxlines, lines); lines = 0; -- 2.39.5