emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c


From: Eli Zaretskii
Subject: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c
Date: Sat, 24 Aug 2019 09:14:05 +0300

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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]