unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c
@ 2019-08-24  6:14 Eli Zaretskii
  2019-08-25  0:52 ` Paul Eggert
  0 siblings, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2019-08-24  6:14 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

I'm sorry, but how is this variant more clear than the previous one?

Please don't assume that I don't know about UNINIT or somehow forgot
it existed.  It is not true that the initializations are "unnecessary"
in this case, just that when geometry is non-zero, x and y are
initialized.  None of that is clear from the UNINIT kludge.  If we
want this to be abundantly clear, we should have a comment there to
the above effect.

      Clarify compiler-pacifier in frame.c

      * src/frame.c (Fx_parse_geometry): Pacify the compiler in a
      different way, so that the human reader can more easily see
      that the initializations are unnecessary.

  diff --git a/src/frame.c b/src/frame.c
  index 8ee8e42..330f98a 100644
  --- a/src/frame.c
  +++ b/src/frame.c
  @@ -5327,7 +5327,7 @@ DEFUN ("x-parse-geometry", Fx_parse_geometry, Sx_parse_geometry, 1, 1, 0,
   On Nextstep, this just calls `ns-parse-geometry'.  */)
     (Lisp_Object string)
   {
  -  int geometry, x = 0, y = 0;
  +  int geometry, x UNINIT, y UNINIT;
     unsigned int width, height;
     Lisp_Object result;



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2019-08-27 12:43 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-24  6:14 [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c Eli Zaretskii
2019-08-25  0:52 ` Paul Eggert
2019-08-25  7:13   ` Eli Zaretskii
2019-08-26  6:34     ` Paul Eggert
2019-08-26  7:54       ` Eli Zaretskii
2019-08-26  8:15         ` Paul Eggert
2019-08-26  9:47           ` Eli Zaretskii
2019-08-26 15:21             ` Óscar Fuentes
2019-08-26 16:13               ` Eli Zaretskii
2019-08-26 18:20                 ` Óscar Fuentes
2019-08-26 18:39                   ` Eli Zaretskii
2019-08-26 19:09                     ` Paul Eggert
2019-08-26 19:15                     ` Óscar Fuentes
2019-08-26 19:33                       ` Eli Zaretskii
2019-08-26 19:49                         ` Óscar Fuentes
2019-08-26 22:33                         ` Paul Eggert
2019-08-27  6:12                           ` Eli Zaretskii
2019-08-27  7:28                             ` Paul Eggert
2019-08-27  8:02                               ` Eli Zaretskii
2019-08-27  9:28                                 ` Paul Eggert
2019-08-27 10:15                                   ` Eli Zaretskii
2019-08-27 12:05                                     ` Paul Eggert
2019-08-27 12:43                                       ` Eli Zaretskii
2019-08-26 18:50             ` Paul Eggert
2019-08-26 18:56               ` Eli Zaretskii
2019-08-26 23:17             ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).