From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: compilation warning Date: Thu, 01 Jul 2010 01:40:15 -0400 Message-ID: References: <4C298AC3.1030405@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1277962831 6019 80.91.229.12 (1 Jul 2010 05:40:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2010 05:40:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 01 07:40:29 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OUCVg-0003G6-Q4 for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 07:40:29 +0200 Original-Received: from localhost ([127.0.0.1]:34556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUCVf-0008BT-Lj for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 01:40:27 -0400 Original-Received: from [199.232.76.173] (port=35119 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUCVX-0008BO-Pl for emacs-devel@gnu.org; Thu, 01 Jul 2010 01:40:19 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OUCVV-0005Pc-Sb for emacs-devel@gnu.org; Thu, 01 Jul 2010 01:40:19 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:38557) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OUCVV-0005PY-Be for emacs-devel@gnu.org; Thu, 01 Jul 2010 01:40:17 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OUCVT-0005p1-Q1; Thu, 01 Jul 2010 01:40:15 -0400 In-Reply-To: <4C298AC3.1030405@gmx.at> (martin rudalics's message of "Tue\, 29 Jun 2010 07\:55\:15 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126584 Archived-At: martin rudalics writes: >> emacs/src/frame.c:1390: warning: suggest braces around empty body in an 'if' statement >> >> The code in question is: >> >> if (NILP (Vrun_hooks) || !NILP (Fframe_parameter (frame, intern ("tooltip")))) >> ; >> >> It looks a bit odd. What's the right fix here? > > I'm using Any reason not to check this in? > *** src/frame.c 2010-04-20 01:50:52 +0000 > --- src/frame.c 2010-06-29 05:36:07 +0000 > *************** > *** 1330,1335 **** > --- 1330,1336 ---- > struct kboard *kb; > > int minibuffer_selected; > + int tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip"))); > > if (EQ (frame, Qnil)) > { > *************** > *** 1385,1393 **** > frame is a tooltip. FORCE is set to `noelisp' when handling > a disconnect from the terminal, so we don't dare call Lisp > code. */ > ! if (NILP (Vrun_hooks) || !NILP (Fframe_parameter (frame, intern ("tooltip")))) > ; > ! if (EQ (force, Qnoelisp)) > pending_funcalls > = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), > pending_funcalls); > --- 1386,1394 ---- > frame is a tooltip. FORCE is set to `noelisp' when handling > a disconnect from the terminal, so we don't dare call Lisp > code. */ > ! if (NILP (Vrun_hooks) || tooltip_frame) > ; > ! else if (EQ (force, Qnoelisp)) > pending_funcalls > = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), > pending_funcalls); > *************** > *** 1633,1639 **** > } > > /* Cause frame titles to update--necessary if we now have just one frame. */ > ! update_mode_lines = 1; > > return Qnil; > } > --- 1634,1641 ---- > } > > /* Cause frame titles to update--necessary if we now have just one frame. */ > ! if (!tooltip_frame) > ! update_mode_lines = 1; > > return Qnil; > }