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.
This commit is contained in:
parent
cf2b7efc78
commit
af025ae850
7 changed files with 41 additions and 12 deletions
|
@ -1,3 +1,23 @@
|
|||
2013-12-17 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* w32term.c (w32_initialize): Declare the argument of
|
||||
set_user_model as const.
|
||||
|
||||
* w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
|
||||
(w32_menu_show): Constify some arguments passed to MessageBox.
|
||||
|
||||
* w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
|
||||
to initialize Lisp objects.
|
||||
|
||||
* w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
|
||||
initialize Lisp objects.
|
||||
|
||||
* frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
|
||||
use variables used only on X under that condition.
|
||||
|
||||
* fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
|
||||
variables not used there.
|
||||
|
||||
2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Fix problems with CANNOT_DUMP and EMACSLOADPATH.
|
||||
|
|
10
src/fileio.c
10
src/fileio.c
|
@ -1942,10 +1942,7 @@ attributes of FILE to NEWNAME, such as its SELinux context and ACL
|
|||
entries (depending on how Emacs was built). */)
|
||||
(Lisp_Object file, Lisp_Object newname, Lisp_Object ok_if_already_exists, Lisp_Object keep_time, Lisp_Object preserve_uid_gid, Lisp_Object preserve_extended_attributes)
|
||||
{
|
||||
int ifd, ofd;
|
||||
int n;
|
||||
char buf[16 * 1024];
|
||||
struct stat st, out_st;
|
||||
struct stat out_st;
|
||||
Lisp_Object handler;
|
||||
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
|
||||
ptrdiff_t count = SPECPDL_INDEX ();
|
||||
|
@ -1956,6 +1953,11 @@ entries (depending on how Emacs was built). */)
|
|||
#endif
|
||||
#ifdef WINDOWSNT
|
||||
int result;
|
||||
#else
|
||||
int ifd, ofd;
|
||||
int n;
|
||||
char buf[16 * 1024];
|
||||
struct stat st;
|
||||
#endif
|
||||
|
||||
encoded_file = encoded_newname = Qnil;
|
||||
|
|
|
@ -2807,7 +2807,9 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
Lisp_Object *values;
|
||||
ptrdiff_t i, p;
|
||||
bool left_no_change = 0, top_no_change = 0;
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
bool icon_left_no_change = 0, icon_top_no_change = 0;
|
||||
#endif
|
||||
bool size_changed = 0;
|
||||
struct gcpro gcpro1, gcpro2;
|
||||
|
||||
|
@ -2954,14 +2956,18 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
/* If one of the icon positions was not set, preserve or default it. */
|
||||
if (! TYPE_RANGED_INTEGERP (int, icon_left))
|
||||
{
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
icon_left_no_change = 1;
|
||||
#endif
|
||||
icon_left = Fcdr (Fassq (Qicon_left, f->param_alist));
|
||||
if (NILP (icon_left))
|
||||
XSETINT (icon_left, 0);
|
||||
}
|
||||
if (! TYPE_RANGED_INTEGERP (int, icon_top))
|
||||
{
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
icon_top_no_change = 1;
|
||||
#endif
|
||||
icon_top = Fcdr (Fassq (Qicon_top, f->param_alist));
|
||||
if (NILP (icon_top))
|
||||
XSETINT (icon_top, 0);
|
||||
|
|
|
@ -2562,7 +2562,7 @@ w32font_filter_properties (Lisp_Object font, Lisp_Object alist)
|
|||
|
||||
struct font_driver w32font_driver =
|
||||
{
|
||||
0, /* Qgdi */
|
||||
LISP_INITIALLY_ZERO, /* Qgdi */
|
||||
0, /* case insensitive */
|
||||
w32font_get_cache,
|
||||
w32font_list,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6468,7 +6468,7 @@ static void
|
|||
w32_initialize (void)
|
||||
{
|
||||
HANDLE shell;
|
||||
HRESULT (WINAPI * set_user_model) (wchar_t * id);
|
||||
HRESULT (WINAPI * set_user_model) (const wchar_t * id);
|
||||
|
||||
baud_rate = 19200;
|
||||
|
||||
|
|
|
@ -964,7 +964,7 @@ otf_features (HDC context, char *table)
|
|||
|
||||
struct font_driver uniscribe_font_driver =
|
||||
{
|
||||
0, /* Quniscribe */
|
||||
LISP_INITIALLY_ZERO, /* Quniscribe */
|
||||
0, /* case insensitive */
|
||||
w32font_get_cache,
|
||||
uniscribe_list,
|
||||
|
|
Loading…
Add table
Reference in a new issue