From: Paul Eggert <eggert@cs.ucla.edu>
To: Angelo Graziosi <angelo.graziosi@alice.it>
Cc: emacs-devel@gnu.org
Subject: Re: MS-Windows warnings (was build failure) for Emacs master
Date: Tue, 12 Apr 2016 15:52:43 -0700 [thread overview]
Message-ID: <570D7C3B.90206@cs.ucla.edu> (raw)
In-Reply-To: <570D6093.8010305@alice.it>
On 04/12/2016 01:54 PM, Angelo Graziosi wrote:
> current build logs have a lot of "garbage" like this:
>
> [...]
> C:/msys64/tmp/mingw-w64-emacs-git/src/emacs/lib-src/ntlib.c:110:15:
> warning: format '%d' expects argument of type 'int', but argument 2
> has type 'DWORD {aka long unsigned int}' [-Wformat=]
>
> printf ("Checking parent status failed: %d\n", GetLastError ());
For portable code, that would be a valid warning. If GetLastError
returns unsigned long, the format should use %lu, not %d
As I understand it, though, MS-Windows defines GetLastError to return
unsigned int on 64-bit machines, and unsigned long on 32-bit machines
(!). This idiosyncrasy could be handled in the MS-Windows port by
something like this:
|#ifdef __MINGW64__ # define pDWORD "" #else # define pDWORD "l" #endif
and then the above code could be: printf ("Checking parent status
failed: %"pDWORD"u\n", GetLastError ()); |
Perhaps %u happens to work on both 32- and 64-bit MS-Windows, and if so
then plain %u should suffice in practice.
> checking whether C compiler handles -Wbuiltin-macro-redefined... yes
> [...]
>
> Why enabling this by default? All this should be OFF by default and
> only the maintainers which need it should enable it
Warnings are enabled by default in master if you have a .git
subdirectory (and thus are more likely to be a maintainer-type). See the
thread containing this email:
http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00174.html
and the followup change here:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5baecbc0ebc11178edd73431b644a5de0a31be25
It would be easy enough to disable -Wformat warnings when compiling
anything under MS-Windows), if MS-Windows developers would prefer that.
I'd rather leave these warnings enabled on non-MS-Windows platforms,
though, as they're useful for catching portability glitches.
next prev parent reply other threads:[~2016-04-12 22:52 UTC|newest]
Thread overview: 119+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 22:11 Build failure for Emacs master Angelo Graziosi
2016-02-23 23:14 ` Paul Eggert
2016-02-24 0:23 ` Angelo Graziosi
2016-02-24 3:42 ` Eli Zaretskii
2016-02-24 9:36 ` Angelo Graziosi
2016-02-24 10:20 ` Angelo Graziosi
2016-02-24 17:37 ` Eli Zaretskii
2016-02-24 22:20 ` Angelo Graziosi
2016-02-25 16:43 ` Eli Zaretskii
2016-03-04 21:50 ` Angelo Graziosi
2016-03-05 7:25 ` Eli Zaretskii
2016-03-05 13:53 ` Angelo Graziosi
2016-03-05 20:59 ` Angelo Graziosi
2016-03-06 3:35 ` Eli Zaretskii
2016-03-06 16:55 ` Eli Zaretskii
2016-03-06 22:00 ` Angelo Graziosi
2016-03-06 17:37 ` Andy Moreton
2016-03-06 17:54 ` Eli Zaretskii
2016-04-12 0:36 ` Angelo Graziosi
2016-04-12 11:36 ` Phillip Lord
2016-04-12 20:54 ` Angelo Graziosi
2016-04-12 22:52 ` Paul Eggert [this message]
2016-04-12 23:36 ` MS-Windows warnings (was build failure) " Angelo Graziosi
2016-04-13 5:49 ` Yuri Khan
2016-04-13 15:26 ` Eli Zaretskii
2016-04-13 18:06 ` Paul Eggert
2016-04-13 19:16 ` Eli Zaretskii
2016-04-19 15:46 ` Davis Herring
2016-04-19 16:04 ` Eli Zaretskii
2016-04-19 19:19 ` Davis Herring
2016-04-12 15:28 ` Build failure " Eli Zaretskii
2016-04-12 21:00 ` Angelo Graziosi
2016-04-12 21:49 ` Andy Moreton
2016-04-13 2:37 ` Eli Zaretskii
2016-04-13 23:11 ` Andy Moreton
2016-04-14 7:32 ` Phillip Lord
2016-04-14 16:06 ` Paul Eggert
2016-04-14 16:19 ` Eli Zaretskii
2016-04-14 16:50 ` O_BINARY and emacs_open (was: Build failure for Emacs master) Paul Eggert
2016-04-15 11:08 ` Build failure for Emacs master Phillip Lord
2016-04-15 14:40 ` Eli Zaretskii
2016-04-18 19:08 ` Phillip Lord
2016-04-18 19:33 ` Eli Zaretskii
2016-04-18 20:05 ` Phillip Lord
2016-04-18 21:10 ` Paul Eggert
2016-04-20 8:18 ` Phillip Lord
2016-04-20 15:05 ` Eli Zaretskii
2016-04-20 16:55 ` Phillip Lord
2016-04-20 17:41 ` Eli Zaretskii
2016-04-20 17:59 ` Andy Moreton
2016-04-21 10:46 ` Phillip Lord
2016-04-14 16:35 ` Eli Zaretskii
2016-04-14 17:06 ` Andy Moreton
2016-04-14 17:48 ` Eli Zaretskii
2016-04-14 18:40 ` Andy Moreton
2016-04-14 19:31 ` Eli Zaretskii
2016-04-14 20:30 ` Andy Moreton
2016-04-15 7:29 ` Eli Zaretskii
2016-04-15 8:18 ` Andy Moreton
2016-04-15 14:38 ` Eli Zaretskii
2016-04-15 15:36 ` Andy Moreton
2016-04-18 8:31 ` Angelo Graziosi
2016-04-18 18:30 ` Eli Zaretskii
2016-04-18 23:48 ` Andy Moreton
2016-04-19 9:58 ` Angelo Graziosi
2016-04-19 14:39 ` Eli Zaretskii
2016-04-19 21:15 ` Angelo Graziosi
2016-04-19 21:18 ` Angelo Graziosi
2016-04-19 21:20 ` Angelo Graziosi
2016-04-20 0:26 ` Paul Eggert
2016-04-20 14:25 ` Angelo Graziosi
2016-04-12 22:42 ` Angelo Graziosi
2016-04-13 20:12 ` Angelo Graziosi
2016-04-13 21:32 ` Paul Eggert
2016-04-13 22:00 ` Angelo Graziosi
2016-04-14 1:31 ` Paul Eggert
2016-04-14 8:03 ` Angelo Graziosi
2016-04-14 15:30 ` Eli Zaretskii
2016-04-14 15:58 ` Building Emacs on MSYS2 (was: Build failure for Emacs master) Óscar Fuentes
2016-04-14 16:09 ` Building Emacs on MSYS2 Paul Eggert
2016-04-14 16:13 ` Óscar Fuentes
2016-04-14 16:21 ` Eli Zaretskii
2016-04-14 16:46 ` Óscar Fuentes
2016-04-14 17:26 ` Eli Zaretskii
2016-04-14 20:09 ` Óscar Fuentes
2016-04-15 15:03 ` Paul Eggert
2016-04-15 15:37 ` Óscar Fuentes
2016-04-15 17:30 ` Paul Eggert
2016-04-15 17:58 ` Óscar Fuentes
2016-04-15 19:15 ` Paul Eggert
2016-04-15 19:40 ` Óscar Fuentes
2016-04-15 20:03 ` Eli Zaretskii
2016-04-15 20:20 ` Óscar Fuentes
2016-04-15 20:49 ` Eli Zaretskii
2016-04-15 21:37 ` Stephen Leake
2016-04-15 22:11 ` Óscar Fuentes
2016-04-16 6:42 ` Eli Zaretskii
2016-04-17 21:46 ` Fixing imagemagick on W32 Stephen Leake
2016-04-18 2:28 ` Eli Zaretskii
2016-04-16 6:30 ` Building Emacs on MSYS2 Eli Zaretskii
2016-04-16 12:17 ` Stephen Leake
2016-04-16 12:40 ` Eli Zaretskii
2016-04-16 20:34 ` png in emacs 25 mingw64 Stephen Leake
2016-04-16 21:02 ` Stephen Leake
2016-04-17 2:46 ` Eli Zaretskii
2016-04-17 2:45 ` Eli Zaretskii
2016-04-18 12:32 ` Building Emacs on MSYS2 Phillip Lord
2016-04-15 19:42 ` Stefan Monnier
2016-04-15 20:17 ` Óscar Fuentes
2016-04-15 21:22 ` Stefan Monnier
2016-04-14 16:15 ` Building Emacs on MSYS2 (was: Build failure for Emacs master) Eli Zaretskii
2016-04-14 16:43 ` Building Emacs on MSYS2 Óscar Fuentes
2016-04-14 17:35 ` Eli Zaretskii
2016-04-14 16:36 ` Build failure for Emacs master Angelo Graziosi
2016-04-14 16:39 ` Paul Eggert
2016-04-14 1:38 ` Stefan Monnier
2016-04-14 2:04 ` John Wiegley
2016-04-14 14:41 ` Paul Eggert
2016-02-24 17:31 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570D7C3B.90206@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=angelo.graziosi@alice.it \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.