From: Eli Zaretskii Date: Fri, 13 Aug 2010 08:10:05 +0000 (+0300) Subject: Shut up compiler warnings due to "char *" and "const char *". X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~315 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94c97d853fee699c2cc044b2d146efaafef5a480;p=emacs.git 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 *". --- 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. */