From 94c97d853fee699c2cc044b2d146efaafef5a480 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 13 Aug 2010 11:10:05 +0300 Subject: [PATCH] Shut up compiler warnings due to "char *" and "const char *". w32menu.c (add_menu_item): Use explicit cast to "char *". (name_is_separator): Make `name' and `start' be "const char *". --- src/ChangeLog | 5 +++++ src/w32menu.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 14213e1c750..9c004656124 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-08-13 Eli Zaretskii + + * w32menu.c (add_menu_item, name_is_separator): Shut up compiler + warnings due to mixing of "char *" and "const char *". + 2010-08-12 Stefan Monnier Introduce a new comment style "c" flag. diff --git a/src/w32menu.c b/src/w32menu.c index bd560219a1d..0aaca5e234e 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1280,9 +1280,9 @@ simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header) /* Is this item a separator? */ static int -name_is_separator (char *name) +name_is_separator (const char *name) { - char *start = name; + const char *start = name; /* Check if name string consists of only dashes ('-'). */ while (*name == '-') name++; @@ -1360,7 +1360,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) strcat (out_string, wv->key); } else - out_string = wv->name; + out_string = (char *)wv->name; /* Quote any special characters within the menu item's text and key binding. */ -- 2.39.2