From: Paul Eggert Date: Mon, 7 Mar 2011 06:43:11 +0000 (-0800) Subject: * xmenu.c (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const" X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~605^2^2~72 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d1f7feedacad0112846d84232b3d4a8dd96b740;p=emacs.git * xmenu.c (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const" since they might point to immutable storage. --- 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;