]> git.eshelyaron.com Git - emacs.git/commitdiff
Clarify Fx_parse_geometry initialization
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Aug 2019 00:46:21 +0000 (17:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Aug 2019 00:49:57 +0000 (17:49 -0700)
* src/frame.c (Fx_parse_geometry): Clarify why local init
isn’t needed.

src/frame.c

index 330f98aee1578e0f4eb48fef57a30609fa226145..cf38c85f09f71226ccd8ab507d42bb3947a4b4b7 100644 (file)
@@ -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;