diff options
author | Eli Zaretskii <eliz@gnu.org> | 2011-03-12 12:51:31 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2011-03-12 12:51:31 +0200 |
commit | 7ac80be95aaa92eacb454d4fa6aa3d2f56058978 (patch) | |
tree | 9f83b16d116b5cc778532c819ec81db1ababec82 | |
parent | a276370e0a8c9434ce0ae2ba72fa6acd69570a0d (diff) | |
download | emacs-7ac80be95aaa92eacb454d4fa6aa3d2f56058978.tar.gz |
Fix compilation warnings on MS-DOS due to constifying of pointers in xmenu.c.
src/msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
Adapt all references accordingly.
src/msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/msdos.c | 6 | ||||
-rw-r--r-- | src/msdos.h | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4b54abe08dd..8534c3b455f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-03-12 Eli Zaretskii <eliz@gnu.org> + + * msdos.c (XMenuAddPane): 3rd argument is `const char *' now. + Adapt all references accordingly. + + * msdos.h (XMenuAddPane): 3rd argument is `const char *' now. + 2011-03-11 Tom Tromey <tromey@redhat.com> * buffer.c (syms_of_buffer): Remove obsolete comment. diff --git a/src/msdos.c b/src/msdos.c index 5d50749cb7e..b0bf5c4fdd9 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -2999,17 +2999,17 @@ XMenuCreate (Display *foo1, Window foo2, char *foo3) to do. */ int -XMenuAddPane (Display *foo, XMenu *menu, char *txt, int enable) +XMenuAddPane (Display *foo, XMenu *menu, const char *txt, int enable) { int len; - char *p; + const char *p; if (!enable) abort (); IT_menu_make_room (menu); menu->submenu[menu->count] = IT_menu_create (); - menu->text[menu->count] = txt; + menu->text[menu->count] = (char *)txt; menu->panenumber[menu->count] = ++menu->panecount; menu->help_text[menu->count] = NULL; menu->count++; diff --git a/src/msdos.h b/src/msdos.h index 4bbe9b134de..5051f2f3837 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -105,7 +105,7 @@ typedef struct x_menu_struct } XMenu; XMenu *XMenuCreate (Display *, Window, char *); -int XMenuAddPane (Display *, XMenu *, char *, int); +int XMenuAddPane (Display *, XMenu *, const char *, int); int XMenuAddSelection (Display *, XMenu *, int, int, char *, int, char *); void XMenuLocate (Display *, XMenu *, int, int, int, int, int *, int *, int *, int *); |