summaryrefslogtreecommitdiff
path: root/src/unexw32.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-09-15 11:46:37 +0300
committerEli Zaretskii <eliz@gnu.org>2017-09-15 11:46:37 +0300
commit015172d1ba36de9ab2ca2cae020b6ab6793dbb8c (patch)
treef68751defdad63d9d14462a63d9948d712f7b08d /src/unexw32.c
parent025e216566312b562bc1b3379e00e97ae539ea5f (diff)
downloademacs-015172d1ba36de9ab2ca2cae020b6ab6793dbb8c.tar.gz
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/unexw32.c')
-rw-r--r--src/unexw32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unexw32.c b/src/unexw32.c
index d3d6a90f686..0c6b48342e5 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -500,8 +500,8 @@ copy_executable_and_dump_data (file_data *p_infile,
if (verbose) \
{ \
printf ("%s\n", (message)); \
- printf ("\t0x%"pDWP" Offset in input file.\n", s - p_infile->file_base); \
- printf ("\t0x%"pDWP" Offset in output file.\n", dst - p_outfile->file_base); \
+ printf ("\t0x%"pDWP" Offset in input file.\n", (DWORD_PTR)(s - p_infile->file_base)); \
+ printf ("\t0x%"pDWP" Offset in output file.\n", (DWORD_PTR)(dst - p_outfile->file_base)); \
printf ("\t0x%"pDWP" Size in bytes.\n", count); \
} \
memcpy (dst, s, count); \
@@ -517,7 +517,7 @@ copy_executable_and_dump_data (file_data *p_infile,
printf ("%s\n", (message)); \
printf ("\t0x%p Address in process.\n", s); \
printf ("\t0x%p Base output file.\n", p_outfile->file_base); \
- printf ("\t0x%"pDWP" Offset in output file.\n", dst - p_outfile->file_base); \
+ printf ("\t0x%"pDWP" Offset in output file.\n", (DWORD_PTR)(dst - p_outfile->file_base)); \
printf ("\t0x%p Address in output file.\n", dst); \
printf ("\t0x%"pDWP" Size in bytes.\n", count); \
} \