summaryrefslogtreecommitdiff
path: root/src/w32menu.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-12-17 19:46:31 +0200
committerEli Zaretskii <eliz@gnu.org>2013-12-17 19:46:31 +0200
commitaf025ae850c8f30431cf79876c4452d9f1679250 (patch)
tree708b8ba45eaffd8e9b3b28d7dec0192d2a517bd7 /src/w32menu.c
parentcf2b7efc78f0004a58b14a1eb470a306a139197d (diff)
downloademacs-af025ae850c8f30431cf79876c4452d9f1679250.tar.gz
Fix some warnings in w32 specific code.
src/w32term.c (w32_initialize): Declare the argument of set_user_model as const. src/w32menu.c <MessageBoxW_Proc>: Fix argument declarations. (w32_menu_show): Constify some arguments passed to MessageBox. src/w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO to initialize Lisp objects. src/w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to initialize Lisp objects. src/frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and use variables used only on X under that condition. src/fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows variables not used there.
Diffstat (limited to 'src/w32menu.c')
-rw-r--r--src/w32menu.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/w32menu.c b/src/w32menu.c
index 4f8e8dbef05..68fbd3aa98e 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -82,8 +82,8 @@ typedef BOOL (WINAPI * SetMenuItemInfoA_Proc) (
IN LPCMENUITEMINFOA);
typedef int (WINAPI * MessageBoxW_Proc) (
IN HWND window,
- IN WCHAR *text,
- IN WCHAR *caption,
+ IN const WCHAR *text,
+ IN const WCHAR *caption,
IN UINT type);
#ifdef NTGUI_UNICODE
@@ -629,7 +629,7 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
{
/* Create a new pane. */
Lisp_Object pane_name, prefix;
- char *pane_string;
+ const char *pane_string;
pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME);
prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
@@ -1145,7 +1145,8 @@ simple_dialog_show (struct frame *f, Lisp_Object contents, Lisp_Object header)
/* Use Unicode if possible, so any language can be displayed. */
if (unicode_message_box)
{
- WCHAR *text, *title;
+ WCHAR *text;
+ const WCHAR *title;
USE_SAFE_ALLOCA;
if (STRINGP (temp))
@@ -1180,7 +1181,7 @@ simple_dialog_show (struct frame *f, Lisp_Object contents, Lisp_Object header)
}
else
{
- char *text, *title;
+ const char *text, *title;
/* Fall back on ANSI message box, but at least use system
encoding so questions representable by the system codepage