aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorEli Zaretskii2017-09-15 11:46:37 +0300
committerEli Zaretskii2017-09-15 11:46:37 +0300
commit015172d1ba36de9ab2ca2cae020b6ab6793dbb8c (patch)
treef68751defdad63d9d14462a63d9948d712f7b08d /src/w32term.c
parent025e216566312b562bc1b3379e00e97ae539ea5f (diff)
downloademacs-015172d1ba36de9ab2ca2cae020b6ab6793dbb8c.tar.gz
emacs-015172d1ba36de9ab2ca2cae020b6ab6793dbb8c.zip
Avoid compilation warnings with GCC 7 on MS-Windows
* src/w32term.c (w32_setup_relief_color, construct_mouse_click) (w32_read_socket): Initialize variables to shut up bogus compilation warnings from GCC 7. * src/unexw32.c (COPY_CHUNK, COPY_PROC_CHUNK): Cast to DWORD_PTR to avoid compiler warnings about printing signed values using %x format spec. * src/dispnew.c (adjust_glyph_matrix): Add eassert to avoid compiler warning about possible NULL pointer dereference. * src/lisp.h (pI): Tweak the definition some more for MinGW64.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/w32term.c b/src/w32term.c
index e62ae7e8426..a7a510b9ecb 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1645,6 +1645,7 @@ w32_setup_relief_color (struct frame *f, struct relief *relief, double factor,
1645 if (w32_alloc_lighter_color (f, &pixel, factor, delta)) 1645 if (w32_alloc_lighter_color (f, &pixel, factor, delta))
1646 xgcv.foreground = relief->pixel = pixel; 1646 xgcv.foreground = relief->pixel = pixel;
1647 1647
1648 xgcv.font = NULL; /* avoid compiler warnings */
1648 if (relief->gc == 0) 1649 if (relief->gc == 0)
1649 { 1650 {
1650#if 0 /* TODO: stipple */ 1651#if 0 /* TODO: stipple */
@@ -3087,8 +3088,8 @@ parse_button (int message, int xbutton, int * pbutton, int * pup)
3087static Lisp_Object 3088static Lisp_Object
3088construct_mouse_click (struct input_event *result, W32Msg *msg, struct frame *f) 3089construct_mouse_click (struct input_event *result, W32Msg *msg, struct frame *f)
3089{ 3090{
3090 int button; 3091 int button = 0;
3091 int up; 3092 int up = 0;
3092 3093
3093 parse_button (msg->msg.message, HIWORD (msg->msg.wParam), 3094 parse_button (msg->msg.message, HIWORD (msg->msg.wParam),
3094 &button, &up); 3095 &button, &up);
@@ -4976,8 +4977,8 @@ w32_read_socket (struct terminal *terminal,
4976 /* If we decide we want to generate an event to be seen 4977 /* If we decide we want to generate an event to be seen
4977 by the rest of Emacs, we put it here. */ 4978 by the rest of Emacs, we put it here. */
4978 bool tool_bar_p = 0; 4979 bool tool_bar_p = 0;
4979 int button; 4980 int button = 0;
4980 int up; 4981 int up = 0;
4981 4982
4982 f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame 4983 f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame
4983 : x_window_to_frame (dpyinfo, msg.msg.hwnd)); 4984 : x_window_to_frame (dpyinfo, msg.msg.hwnd));