emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 84f1674: Clarify Fx_parse_geometry initialization


From: Paul Eggert
Subject: [Emacs-diffs] master 84f1674: Clarify Fx_parse_geometry initialization
Date: Sat, 24 Aug 2019 20:50:03 -0400 (EDT)

branch: master
commit 84f1674ee8cbd83ea219595e9adec2d148946976
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Clarify Fx_parse_geometry initialization
    
    * src/frame.c (Fx_parse_geometry): Clarify why local init
    isn’t needed.
---
 src/frame.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/frame.c b/src/frame.c
index 330f98a..cf38c85 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -5327,9 +5327,10 @@ or a list (- N) meaning -N pixels relative to 
bottom/right corner.
 On Nextstep, this just calls `ns-parse-geometry'.  */)
   (Lisp_Object string)
 {
-  int geometry, x UNINIT, y UNINIT;
+  /* x and y don't need initialization, as they are not accessed
+     unless XParseGeometry sets them.  */
+  int x UNINIT, y UNINIT;
   unsigned int width, height;
-  Lisp_Object result;
 
   CHECK_STRING (string);
 
@@ -5337,9 +5338,9 @@ On Nextstep, this just calls `ns-parse-geometry'.  */)
   if (strchr (SSDATA (string), ' ') != NULL)
     return call1 (Qns_parse_geometry, string);
 #endif
-  geometry = XParseGeometry (SSDATA (string),
-                            &x, &y, &width, &height);
-  result = Qnil;
+  int geometry = XParseGeometry (SSDATA (string),
+                                &x, &y, &width, &height);
+  Lisp_Object result = Qnil;
   if (geometry & XValue)
     {
       Lisp_Object element;



reply via email to

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