From: Paul Eggert Date: Tue, 22 Mar 2011 08:59:50 +0000 (-0700) Subject: * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~513^2~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=916c72e97a711e6d0f571a507634e4f795fbaf6c;p=emacs.git * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes that could (at least in theory) be that large. --- diff --git a/src/ChangeLog b/src/ChangeLog index fd135de123b..c8fa1e55695 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-22 Paul Eggert + * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes + that could (at least in theory) be that large. + * xdisp.c (message_log_check_duplicate): Return unsigned long, not int. This is less likely to overflow, and avoids undefined behavior if overflow does occur. All callers changed. Use strtoul to scan diff --git a/src/xmenu.c b/src/xmenu.c index eab7bb03f20..60ac27a5b8f 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -922,7 +922,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) #endif Lisp_Object items; widget_value *wv, *first_wv, *prev_wv = 0; - int i, last_i = 0; + EMACS_UINT i, last_i = 0; int *submenu_start, *submenu_end; int *submenu_top_level_items, *submenu_n_panes;