[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;
- [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c,
Eli Zaretskii <=
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Paul Eggert, 2019/08/24
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Eli Zaretskii, 2019/08/25
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Paul Eggert, 2019/08/26
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Eli Zaretskii, 2019/08/26
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Paul Eggert, 2019/08/26
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Eli Zaretskii, 2019/08/26
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Óscar Fuentes, 2019/08/26
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Eli Zaretskii, 2019/08/26
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Óscar Fuentes, 2019/08/26
- Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c, Eli Zaretskii, 2019/08/26