# HG changeset patch # User Eli Zaretskii # Date 1281687005 -10800 # Node ID 779e72b463fd5219f7b5cbe57a6e2dd4c0bc4653 # Parent 6fb5db53272f7d0d88c39f913dae42332587822a 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 -r 6fb5db53272f -r 779e72b463fd src/ChangeLog --- a/src/ChangeLog Fri Aug 13 08:57:12 2010 +0200 +++ b/src/ChangeLog Fri Aug 13 11:10:05 2010 +0300 @@ -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 -r 6fb5db53272f -r 779e72b463fd src/w32menu.c --- a/src/w32menu.c Fri Aug 13 08:57:12 2010 +0200 +++ b/src/w32menu.c Fri Aug 13 11:10:05 2010 +0300 @@ -1280,9 +1280,9 @@ /* 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 @@ 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. */