From f390e2d53a670e4ebcb6b73f4baeaf792f46c112 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 5 Apr 2011 13:26:55 -0700 Subject: [PATCH] * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats. --- src/ChangeLog | 2 ++ src/xmenu.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 99cdde19234..282b41afd3c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ Fix more problems found by GCC 4.6.0's static checks. + * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats. + * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats. * fns.c (Fstring_to_unibyte): Don't rely on undefined behavior diff --git a/src/xmenu.c b/src/xmenu.c index 8ecef00c88e..6e175e69039 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -341,7 +341,7 @@ for instance using the window manager, then this produces a quit and unbind_to (specpdl_count, Qnil); discard_menu_items (); - if (error_name) error (error_name); + if (error_name) error ("%s", error_name); return selection; } #endif -- 2.39.2