There are still some issues with the pI format. This seems to fix them:On Thu 14 Sep 2017, Eli Zaretskii wrote:
>> Date: Tue, 12 Sep 2017 21:38:24 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: rcopley@gmail.com, emacs-devel@gnu.org
>>
>> > From: Fabrice Popineau <fabrice.popineau@centralesupelec.fr >
>> > Date: Tue, 12 Sep 2017 20:01:58 +0200
>> > Cc: Richard Copley <rcopley@gmail.com>, Emacs developers <emacs-devel@gnu.org>
>> >
>> > As an alternative, I can provide them.
>> > I have the same install with the same warnings.
>> >
>> > Should you want them, they are at this address :
>> > https://drive.google.com/file/d/0BzJyP_aI_ouHOWR6YXZ1LTRiam8 /view?usp=sharing
>>
>> Thanks. I think I see the problems, or at least some of them, but I
>> need to think how to solve this for all the supported MinGW versions
>> to work correctly.
>
> It was a mess, but I hope I fixed these warnings now. Please try the
> latest master and see if any fallout remains.
diff --git a/src/lisp.h b/src/lisp.h
index c5aea9c34c..f522e5ee1c 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -99,7 +99,7 @@ enum { EMACS_INT_WIDTH = LLONG_WIDTH, EMACS_UINT_WIDTH = ULLONG_WIDTH };
later and the runtime version is 5.0.0 or later. Otherwise,
printf-like functions are declared with __ms_printf__ attribute,
which will cause a warning for %lld etc. */
-# if defined __MINGW32__ \
+# if defined __MINGW32__ && !defined MINGW_W64 \
&& (!defined __USE_MINGW_ANSI_STDIO \
|| !(GNUC_PREREQ (6, 0, 0) && __MINGW32_MAJOR_VERSION >= 5))
# define pI "I64"
There are also several similar warnings in unexw32.c due to signed/unsigned mismatch:
../../src/unexw32.c: In function 'copy_executable_and_dump_data':
../../src/unexw32.c:503:10: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'long long int' [-Wformat=]
printf ("\t0x%"pDWP" Offset in input file.\n", s - p_infile->file_base); \
^ ~~~~~~~~~~~~~~~
../../src/unexw32.c:553:3: note: in expansion of macro 'COPY_CHUNK'
COPY_CHUNK ("Copying DOS header...", dos_header,
^~~~~~~~~~
../../src/unexw32.c:475:21: note: format string is defined here
# define pDWP "16llx"
^
Should these be using the ptrdiff_t formatter pD from lisp.h ?