>From 84f1674ee8cbd83ea219595e9adec2d148946976 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Aug 2019 17:46:21 -0700 Subject: [PATCH] Clarify Fx_parse_geometry initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 330f98aee1..cf38c85f09 100644 --- a/src/frame.c +++ b/src/frame.c @@ -5327,9 +5327,10 @@ 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 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 @@ DEFUN ("x-parse-geometry", Fx_parse_geometry, Sx_parse_geometry, 1, 1, 0, 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; -- 2.17.1