[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suspicious warning in W64 build
From: |
Eli Zaretskii |
Subject: |
Re: Suspicious warning in W64 build |
Date: |
Fri, 15 Sep 2017 11:54:42 +0300 |
> From: Richard Copley <address@hidden>
> Date: Thu, 14 Sep 2017 20:34:42 +0100
> Cc: Fabrice Popineau <address@hidden>,
> Emacs Development <address@hidden>
>
> Not much. Here's another transcript. It's a lot better.
Thanks, please try the latest master. I hope I fixed most of the
warnings in Windows specific code there.
I must say that GCC 7 static code analysis is really imperfect, not
good enough for producing useful warnings from its results, because
some of the warnings are outright wrong. For example this one:
w32term.c: In function 'w32_read_socket':
w32term.c:4979:10: warning: 'button' is used uninitialized in this function
[-Wuninitialized]
int button;
^~~~~~
w32term.c:3099:16: warning: 'button' may be used uninitialized in this
function [-Wmaybe-uninitialized]
result->code = button;
~~~~~~~~~~~~~^~~~~~~~
w32term.c:3090:7: note: 'button' was declared here
int button;
^~~~~~
w32term.c:3104:6: warning: 'up' may be used uninitialized in this function
[-Wmaybe-uninitialized]
| (up
~~~
? up_modifier
~~~~~~~~~~~~~
: down_modifier));
^~~~~~~~~~~~~~~~
w32term.c:3091:7: note: 'up' was declared here
int up;
^~
w32term.c:5018:9: warning: 'up' may be used uninitialized in this function
[-Wmaybe-uninitialized]
if (up)
^
Evidently, GCC 7 doesn't see that the function parse_button
initializes these 2 variables.
About this warning:
w32.c:7550:1: warning: no previous prototype for 'sys_strerror'
[-Wmissing-prototypes]
sys_strerror (int error_no)
^~~~~~~~~~~~
What MinGW64 header has the prototype of strerror? I thought it was
string.h, like in mingw.org's headers, but evidently that's not true?
If the prototype is in string.h, then why is this warning being
displayed?
A few warnings are not specific to Windows, I will describe them in a
separate message.
Thanks for the transcript, it was really useful.
- Re: Suspicious warning in W64 build, (continued)
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/12
- Re: Suspicious warning in W64 build, Fabrice Popineau, 2017/09/12
- Re: Suspicious warning in W64 build, Richard Copley, 2017/09/12
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/12
- Re: Suspicious warning in W64 build, Richard Copley, 2017/09/12
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/12
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/14
- Re: Suspicious warning in W64 build, Richard Copley, 2017/09/14
- Re: Suspicious warning in W64 build,
Eli Zaretskii <=
- Re: Suspicious warning in W64 build, Richard Copley, 2017/09/15
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/16
- Re: Suspicious warning in W64 build, Richard Copley, 2017/09/16
- Re: Suspicious warning in W64 build, Richard Copley, 2017/09/16
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/16
- Re: Suspicious warning in W64 build, Richard Copley, 2017/09/16
- Re: Suspicious warning in W64 build, Fabrice Popineau, 2017/09/16
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/16
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/15
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/15