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/conf_post.h | |
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/conf_post.h')
-rw-r--r-- | src/conf_post.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_post.h b/src/conf_post.h index 4459caf3f99..431b7a9d826 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -211,7 +211,8 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ extern void _DebPrint (const char *fmt, ...); # define DebPrint(stuff) _DebPrint stuff # else -# define DebPrint(stuff) +/* Avoid compiler warnings about empty body of 'if' statement. */ +# define DebPrint(stuff) do {} while (false) # endif #endif |