From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c Date: Sat, 24 Aug 2019 09:14:05 +0300 Message-ID: <835zmnjdjm.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="171747"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 24 08:14:03 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i1PJK-000iVX-S4 for ged-emacs-devel@m.gmane.org; Sat, 24 Aug 2019 08:14:02 +0200 Original-Received: from localhost ([::1]:36036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1PJJ-00025z-CO for ged-emacs-devel@m.gmane.org; Sat, 24 Aug 2019 02:14:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56654) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1PJC-00025p-5Y for emacs-devel@gnu.org; Sat, 24 Aug 2019 02:13:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i1PJB-0001Zw-Ey; Sat, 24 Aug 2019 02:13:53 -0400 Original-Received: from [176.228.60.248] (port=1118 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i1PJA-0005wb-Uc; Sat, 24 Aug 2019 02:13:53 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239534 Archived-At: 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;