diff options
author | Ken Brown <kbrown@cornell.edu> | 2016-06-20 23:05:12 -0400 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2016-06-20 23:05:12 -0400 |
commit | 560c4ab1c32eacc48f62e4176a1e9fb10ac7665b (patch) | |
tree | 22aa9842a1d770f810634f21a2620b8ab1f8ac44 /src/w32menu.c | |
parent | d4c1535c6321318e3ba96a482303bfc790a47266 (diff) | |
download | emacs-560c4ab1c32eacc48f62e4176a1e9fb10ac7665b.tar.gz |
Fix compiler warnings in Cygwin-w32 build
* src/conf_post.h (DebPrint) [!EMACSDEBUG]: Add empty do-while
loop to avoid compiler warnings about empty body of 'if'
statement.
* src/image.c [HAVE_NTGUI] (DefaultDepthOfScreen): Disable unused
macro.
(x_create_bitmap_from_data): Declare 'frame'.
(x_create_bitmap_from_file): Don't declare unused variable
'dpyinfo'.
* src/lisp.h (AUTO_STRING_WITH_LEN): Avoid initialization to
prevent "jump-misses-init" compiler warnings.
* src/w32fns.c (check_w32_winkey_state): Define and use only if
WINDOWSNT.
(Fx_show_tip): Declare 'f'.
(Fx_file_dialog): Declare 'filter_a' only if not NTGUI_UNICODE.
(w32_strerror): Use format specifier %d for sprintf argument of
type int.
(emacs_abort): Cast sprintf argument of type DWORD to unsigned
int, and use format specifier %x, for compatibility with Cygwin.
(unicode_append_menu) [NTGUI_UNICODE]:
* src/w32menu.c [NTGUI_UNICODE] (get_menu_item_info)
(set_menu_item_info, unicode_append_menu)
(unicode_message_box):
* src/menu.c [NTGUI_UNICODE] (unicode_append_menu): Define as
functions rather than macros to avoid "address will always
evaluate as true" compiler warnings.
* src/w32font.c (w32_to_x_charset): Use format specifier %d for
sprintf argument of type int.
* src/w32term.c (x_draw_glyphless_glyph_string_foreground): Cast
sprintf argument of type int to unsigned int to match %X format
specifier.
(w32_scroll_bar_handle_click):
(w32_horizontal_scroll_bar_handle_click): Declare 'f'.
* src/w32term.h (FRAME_DISPLAY_INFO): Explicitly discard unused
argument.
Diffstat (limited to 'src/w32menu.c')
-rw-r--r-- | src/w32menu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index fecbf33a12b..13296d9d855 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -77,10 +77,10 @@ typedef int (WINAPI * MessageBoxW_Proc) ( IN UINT type); #ifdef NTGUI_UNICODE -#define get_menu_item_info GetMenuItemInfoA -#define set_menu_item_info SetMenuItemInfoA -#define unicode_append_menu AppendMenuW -#define unicode_message_box MessageBoxW +GetMenuItemInfoA_Proc get_menu_item_info = GetMenuItemInfoA; +SetMenuItemInfoA_Proc set_menu_item_info = SetMenuItemInfoA; +AppendMenuW_Proc unicode_append_menu = AppendMenuW; +MessageBoxW_Proc unicode_message_box = MessageBoxW; #else /* !NTGUI_UNICODE */ GetMenuItemInfoA_Proc get_menu_item_info = NULL; SetMenuItemInfoA_Proc set_menu_item_info = NULL; |